| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'package:path/path.dart' as path; | 5 import 'package:path/path.dart' as path; |
| 6 | 6 |
| 7 import '../descriptor.dart' as d; | 7 import '../descriptor.dart' as d; |
| 8 import '../test_pub.dart'; | 8 import '../test_pub.dart'; |
| 9 | 9 |
| 10 const SCRIPT = r""" | 10 const SCRIPT = r""" |
| 11 import '../../a.dart'; | 11 import '../../a.dart'; |
| 12 import '../b.dart'; | 12 import '../b.dart'; |
| 13 main() { | 13 main() { |
| 14 print("$a $b"); | 14 print("$a $b"); |
| 15 } | 15 } |
| 16 """; | 16 """; |
| 17 | 17 |
| 18 main() { | 18 main() { |
| 19 initConfig(); | |
| 20 integration('allows assets in parent directories of the entrypoint to be' | 19 integration('allows assets in parent directories of the entrypoint to be' |
| 21 'accessed', () { | 20 'accessed', () { |
| 22 d.dir(appPath, [ | 21 d.dir(appPath, [ |
| 23 d.appPubspec(), | 22 d.appPubspec(), |
| 24 d.dir("tool", [ | 23 d.dir("tool", [ |
| 25 d.file("a.dart", "var a = 'a';"), | 24 d.file("a.dart", "var a = 'a';"), |
| 26 d.dir("a", [ | 25 d.dir("a", [ |
| 27 d.file("b.dart", "var b = 'b';"), | 26 d.file("b.dart", "var b = 'b';"), |
| 28 d.dir("b", [ | 27 d.dir("b", [ |
| 29 d.file("app.dart", SCRIPT) | 28 d.file("app.dart", SCRIPT) |
| 30 ]) | 29 ]) |
| 31 ]) | 30 ]) |
| 32 ]) | 31 ]) |
| 33 ]).create(); | 32 ]).create(); |
| 34 | 33 |
| 35 var pub = pubRun(args: [path.join("tool", "a", "b", "app")]); | 34 var pub = pubRun(args: [path.join("tool", "a", "b", "app")]); |
| 36 pub.stdout.expect("a b"); | 35 pub.stdout.expect("a b"); |
| 37 pub.shouldExit(); | 36 pub.shouldExit(); |
| 38 }); | 37 }); |
| 39 } | 38 } |
| OLD | NEW |