Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: sdk/lib/_internal/pub/test/real_version_test.dart

Issue 141113011: Support directories other than "web" in pub build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 '../lib/src/sdk.dart' as sdk;
10
11 import 'package:path/path.dart' as path; 9 import 'package:path/path.dart' as path;
12 import 'package:scheduled_test/scheduled_process.dart'; 10 import 'package:scheduled_test/scheduled_process.dart';
13 import 'package:scheduled_test/scheduled_test.dart'; 11 import 'package:scheduled_test/scheduled_test.dart';
12
13 import '../lib/src/exit_codes.dart' as exit_codes;
14 import '../lib/src/sdk.dart' as sdk;
14 import 'test_pub.dart'; 15 import 'test_pub.dart';
15 16
16 main() { 17 main() {
17 initConfig(); 18 initConfig();
18 19
19 // This test is a bit funny. 20 // This test is a bit funny.
20 // 21 //
21 // Pub parses the "version" file that gets generated and shipped with the SDK. 22 // Pub parses the "version" file that gets generated and shipped with the SDK.
22 // We want to make sure that the actual version file that gets created is 23 // We want to make sure that the actual version file that gets created is
23 // also one pub can parse. If this test fails, it means the version file's 24 // also one pub can parse. If this test fails, it means the version file's
24 // format has changed in a way pub didn't expect. 25 // format has changed in a way pub didn't expect.
25 // 26 //
26 // Note that this test expects to be invoked from a Dart executable that is 27 // Note that this test expects to be invoked from a Dart executable that is
27 // in the built SDK's "bin" directory. Note also that this invokes pub from 28 // in the built SDK's "bin" directory. Note also that this invokes pub from
28 // the built SDK directory, and not the live pub code directly in the repo. 29 // the built SDK directory, and not the live pub code directly in the repo.
29 integration('parse the real SDK "version" file', () { 30 integration('parse the real SDK "version" file', () {
30 // Get the path to the pub binary in the SDK. 31 // Get the path to the pub binary in the SDK.
31 var pubPath = path.join(sdk.rootDirectory, 'bin', 32 var pubPath = path.join(sdk.rootDirectory, 'bin',
32 Platform.operatingSystem == "windows" ? "pub.bat" : "pub"); 33 Platform.operatingSystem == "windows" ? "pub.bat" : "pub");
33 34
34 var pub = new ScheduledProcess.start(pubPath, ['version']); 35 var pub = new ScheduledProcess.start(pubPath, ['version']);
35 expect(pub.nextLine(), completion(startsWith("Pub"))); 36 expect(pub.nextLine(), completion(startsWith("Pub")));
36 pub.shouldExit(0); 37 pub.shouldExit(exit_codes.SUCCESS);
37 }); 38 });
38 } 39 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/test/pub_uploader_test.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698