| 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'; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 Process.runSync("latex", [fileName], workingDirectory: workingDirectory); | 150 Process.runSync("latex", [fileName], workingDirectory: workingDirectory); |
| 151 | 151 |
| 152 runAddHash() => | 152 runAddHash() => |
| 153 Process.runSync(dartExecutable, | 153 Process.runSync(dartExecutable, |
| 154 [path.join(dartRootPath, "tools", "addlatexhash.dart"), | 154 [path.join(dartRootPath, "tools", "addlatexhash.dart"), |
| 155 tmpSpecPath, | 155 tmpSpecPath, |
| 156 hashPath, | 156 hashPath, |
| 157 listPath]); | 157 listPath]); |
| 158 | 158 |
| 159 runDvi2tty(dviFile) => | 159 runDvi2tty(dviFile) => |
| 160 Process.runSync("dvi2tty", [dviFile], workingDirectory: tmpDir.path); | 160 Process.runSync("dvi2tty", [dviFile], workingDirectory: tmpDirPath); |
| 161 | 161 |
| 162 chkDvi2tty(file, subject) => | 162 chkDvi2tty(file, subject) => |
| 163 checkAction(runDvi2tty(file), "dvitty on $subject failed"); | 163 checkAction(runDvi2tty(file), "dvitty on $subject failed"); |
| 164 | 164 |
| 165 // perform test | 165 // perform test |
| 166 var renewLMHashCmd = r"\renewcommand{\LMHash}[1]{\OriginalLMHash{xxxx}}"; | 166 var renewLMHashCmd = r"\renewcommand{\LMHash}[1]{\OriginalLMHash{xxxx}}"; |
| 167 new File(styPath) | 167 new File(styPath) |
| 168 .copySync(tmpStyPath) | 168 .copySync(tmpStyPath) |
| 169 .writeAsStringSync(renewLMHashCmd, mode: FileMode.APPEND); | 169 .writeAsStringSync(renewLMHashCmd, mode: FileMode.APPEND); |
| 170 new File(specPath).copySync(tmpSpecPath); | 170 new File(specPath).copySync(tmpSpecPath); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 195 main([args]) { | 195 main([args]) { |
| 196 testCutMatch(); | 196 testCutMatch(); |
| 197 testSisp(); | 197 testSisp(); |
| 198 | 198 |
| 199 runWithTempDir(testSameHash); | 199 runWithTempDir(testSameHash); |
| 200 // latex and dvi2tty are not installed in the standard test environment | 200 // latex and dvi2tty are not installed in the standard test environment |
| 201 if (args.length > 0 && args[0] == "local") { | 201 if (args.length > 0 && args[0] == "local") { |
| 202 runWithTempDir(testSameDVI); | 202 runWithTempDir(testSameDVI); |
| 203 } | 203 } |
| 204 } | 204 } |
| OLD | NEW |