| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #library('pub_tests'); | 5 #library('pub_tests'); |
| 6 | 6 |
| 7 #import('dart:io'); | 7 #import('dart:io'); |
| 8 | 8 |
| 9 #import('test_pub.dart'); | 9 #import('test_pub.dart'); |
| 10 #import('../../../lib/unittest/unittest.dart'); | 10 #import('../../../lib/unittest/unittest.dart'); |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 dir(packagesPath, [ | 862 dir(packagesPath, [ |
| 863 dir('foo', [ | 863 dir('foo', [ |
| 864 file('foo.dart', 'main() => print("foo 1.0.0");') | 864 file('foo.dart', 'main() => print("foo 1.0.0");') |
| 865 ]) | 865 ]) |
| 866 ]).scheduleValidate(); | 866 ]).scheduleValidate(); |
| 867 | 867 |
| 868 run(); | 868 run(); |
| 869 }); | 869 }); |
| 870 } | 870 } |
| 871 | 871 |
| 872 updateCommand() { |
| 873 test("updates locked Git packages", () { |
| 874 ensureGit(); |
| 875 |
| 876 git('foo.git', [ |
| 877 file('foo.dart', 'main() => "foo";') |
| 878 ]).scheduleCreate(); |
| 879 |
| 880 git('bar.git', [ |
| 881 file('bar.dart', 'main() => "bar";') |
| 882 ]).scheduleCreate(); |
| 883 |
| 884 dir(appPath, [ |
| 885 file('pubspec.yaml', ''' |
| 886 dependencies: |
| 887 foo: |
| 888 git: ../foo.git |
| 889 bar: |
| 890 git: ../foo.git |
| 891 ''') |
| 892 ]).scheduleCreate(); |
| 893 |
| 894 schedulePub(args: ['install'], |
| 895 output: const RegExp(@"Dependencies installed!$")); |
| 896 |
| 897 dir(packagesPath, [ |
| 898 dir('foo', [ |
| 899 file('foo.dart', 'main() => "foo";') |
| 900 ]), |
| 901 dir('bar', [ |
| 902 file('bar.dart', 'main() => "bar";') |
| 903 ]) |
| 904 ]).scheduleValidate(); |
| 905 |
| 906 git('foo.git', [ |
| 907 file('foo.dart', 'main() => "foo 2";') |
| 908 ]).scheduleCommit(); |
| 909 |
| 910 git('bar.git', [ |
| 911 file('bar.dart', 'main() => "bar 2";') |
| 912 ]).scheduleCommit(); |
| 913 |
| 914 schedulePub(args: ['update'], |
| 915 output: const RegExp(@"Dependencies updated!$")); |
| 916 |
| 917 dir(packagesPath, [ |
| 918 dir('foo', [ |
| 919 file('foo.dart', 'main() => "foo 2";') |
| 920 ]), |
| 921 dir('bar', [ |
| 922 file('bar.dart', 'main() => "bar 2";') |
| 923 ]) |
| 924 ]).scheduleValidate(); |
| 925 |
| 926 run(); |
| 927 }); |
| 928 } |
| 929 |
| 872 versionCommand() { | 930 versionCommand() { |
| 873 test('displays the current version', () => | 931 test('displays the current version', () => |
| 874 runPub(args: ['version'], output: VERSION_STRING)); | 932 runPub(args: ['version'], output: VERSION_STRING)); |
| 875 } | 933 } |
| OLD | NEW |