| 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 '../../descriptor.dart' as d; | 5 import '../../descriptor.dart' as d; |
| 6 import '../../test_pub.dart'; | 6 import '../../test_pub.dart'; |
| 7 | 7 |
| 8 main() { | 8 main() { |
| 9 integration('the spawned application can load its own resource', () { | 9 integration('the spawned application can load its own resource', () { |
| 10 servePackages((builder) { | 10 servePackages((builder) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 schedulePub(args: ["global", "activate", "foo"]); | 30 schedulePub(args: ["global", "activate", "foo"]); |
| 31 | 31 |
| 32 var pub = pubRun(global: true, args: ["foo:script"]); | 32 var pub = pubRun(global: true, args: ["foo:script"]); |
| 33 | 33 |
| 34 // TODO(nweiz): Enable this when sdk#23990 is fixed. | 34 // TODO(nweiz): Enable this when sdk#23990 is fixed. |
| 35 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "myapp/lib/resource.txt"))); | 35 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "myapp/lib/resource.txt"))); |
| 36 | 36 |
| 37 pub.stdout.expect("hello!"); | 37 pub.stdout.expect("hello!"); |
| 38 pub.shouldExit(0); | 38 pub.shouldExit(0); |
| 39 }); | 39 }, |
| 40 skip: "Issue https://github.com/dart-lang/pub/issues/1446"); |
| 40 | 41 |
| 41 integration("the spawned application can load a dependency's resource", () { | 42 integration("the spawned application can load a dependency's resource", () { |
| 42 servePackages((builder) { | 43 servePackages((builder) { |
| 43 builder.serve("bar", "1.0.0", contents: [ | 44 builder.serve("bar", "1.0.0", contents: [ |
| 44 d.dir("lib", [ | 45 d.dir("lib", [ |
| 45 d.file("resource.txt", "hello!") | 46 d.file("resource.txt", "hello!") |
| 46 ]) | 47 ]) |
| 47 ]); | 48 ]); |
| 48 | 49 |
| 49 builder.serve("foo", "1.0.0", deps: { | 50 builder.serve("foo", "1.0.0", deps: { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 66 | 67 |
| 67 schedulePub(args: ["global", "activate", "foo"]); | 68 schedulePub(args: ["global", "activate", "foo"]); |
| 68 | 69 |
| 69 var pub = pubRun(global: true, args: ["foo:script"]); | 70 var pub = pubRun(global: true, args: ["foo:script"]); |
| 70 | 71 |
| 71 // TODO(nweiz): Enable this when sdk#23990 is fixed. | 72 // TODO(nweiz): Enable this when sdk#23990 is fixed. |
| 72 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "myapp/lib/resource.txt"))); | 73 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "myapp/lib/resource.txt"))); |
| 73 | 74 |
| 74 pub.stdout.expect("hello!"); | 75 pub.stdout.expect("hello!"); |
| 75 pub.shouldExit(0); | 76 pub.shouldExit(0); |
| 76 }); | 77 }, |
| 78 skip: "Issue https://github.com/dart-lang/pub/issues/1446"); |
| 77 | 79 |
| 78 integration('a mutable application can load its own resource', () { | 80 integration('a mutable application can load its own resource', () { |
| 79 d.dir("foo", [ | 81 d.dir("foo", [ |
| 80 d.libPubspec("foo", "1.0.0"), | 82 d.libPubspec("foo", "1.0.0"), |
| 81 d.dir("lib", [ | 83 d.dir("lib", [ |
| 82 d.file("resource.txt", "hello!") | 84 d.file("resource.txt", "hello!") |
| 83 ]), | 85 ]), |
| 84 d.dir("bin", [ | 86 d.dir("bin", [ |
| 85 d.file("script.dart", """ | 87 d.file("script.dart", """ |
| 86 main() async { | 88 main() async { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 97 | 99 |
| 98 schedulePub(args: ["global", "activate", "--source", "path", "../foo"]); | 100 schedulePub(args: ["global", "activate", "--source", "path", "../foo"]); |
| 99 | 101 |
| 100 var pub = pubRun(global: true, args: ["foo:script"]); | 102 var pub = pubRun(global: true, args: ["foo:script"]); |
| 101 | 103 |
| 102 // TODO(nweiz): Enable this when sdk#23990 is fixed. | 104 // TODO(nweiz): Enable this when sdk#23990 is fixed. |
| 103 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "myapp/lib/resource.txt"))); | 105 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "myapp/lib/resource.txt"))); |
| 104 | 106 |
| 105 pub.stdout.expect("hello!"); | 107 pub.stdout.expect("hello!"); |
| 106 pub.shouldExit(0); | 108 pub.shouldExit(0); |
| 107 }); | 109 }, |
| 110 skip: "Issue https://github.com/dart-lang/pub/issues/1446"); |
| 108 } | 111 } |
| OLD | NEW |