OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 // testing ../../../tools/addlatexhash.dart | 6 // testing ../../../tools/addlatexhash.dart |
7 | 7 |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import 'package:path/path.dart' as path; | 9 import 'package:path/path.dart' as path; |
10 import '../../../tools/addlatexhash.dart'; | 10 import '../../../tools/addlatexhash.dart'; |
11 | 11 |
12 final scriptDir = path.dirname(path.fromUri(Platform.script)); | 12 final execDir = path.dirname(path.fromUri(Platform.executable)); |
13 final dartRootDir = path.dirname(path.dirname(path.dirname(scriptDir))); | 13 final dartRootDir = path.dirname(path.dirname(execDir)); |
14 final dartRootPath = dartRootDir.toString(); | 14 final dartRootPath = dartRootDir.toString(); |
15 | 15 |
16 List<String> packageOptions() { | 16 List<String> packageOptions() { |
17 if (Platform.packageRoot != null) { | 17 if (Platform.packageRoot != null) { |
18 return <String>['--package-root=${Platform.packageRoot}']; | 18 return <String>['--package-root=${Platform.packageRoot}']; |
19 } else if (Platform.packageConfig != null) { | 19 } else if (Platform.packageConfig != null) { |
20 return <String>['--packages=${Platform.packageConfig}']; | 20 return <String>['--packages=${Platform.packageConfig}']; |
21 } else { | 21 } else { |
22 return <String>[]; | 22 return <String>[]; |
23 } | 23 } |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 main([args]) { | 213 main([args]) { |
214 testCutMatch(); | 214 testCutMatch(); |
215 testSisp(); | 215 testSisp(); |
216 | 216 |
217 runWithTempDir(testSameHash); | 217 runWithTempDir(testSameHash); |
218 // latex and dvi2tty are not installed in the standard test environment | 218 // latex and dvi2tty are not installed in the standard test environment |
219 if (args.length > 0 && args[0] == "local") { | 219 if (args.length > 0 && args[0] == "local") { |
220 runWithTempDir(testSameDVI); | 220 runWithTempDir(testSameDVI); |
221 } | 221 } |
222 } | 222 } |
OLD | NEW |