| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 } | 66 } |
| 67 | 67 |
| 68 // Check that the hash values of paragraphs in the specially prepared | 68 // Check that the hash values of paragraphs in the specially prepared |
| 69 // LaTeX source 'addlatexhash_test_src.tex' are identical in groups | 69 // LaTeX source 'addlatexhash_test_src.tex' are identical in groups |
| 70 // of eight (so we get 8 identical hash values, then another hash | 70 // of eight (so we get 8 identical hash values, then another hash |
| 71 // value 8 times, etc.) | 71 // value 8 times, etc.) |
| 72 testSameHash(String tmpDirPath) { | 72 testSameHash(String tmpDirPath) { |
| 73 // file names/paths for file containing groups of 8 variants of a paragraph | 73 // file names/paths for file containing groups of 8 variants of a paragraph |
| 74 const par8timesName = "addlatexhash_test_src"; | 74 const par8timesName = "addlatexhash_test_src"; |
| 75 const par8timesFileName = "$par8timesName.tex"; | 75 const par8timesFileName = "$par8timesName.tex"; |
| 76 final par8timesDirPath = path.join(dartRootDir, "tests", "standalone", "io"); | 76 final par8timesDirPath = |
| 77 path.join(dartRootDir, "tests", "standalone_2", "io"); |
| 77 final par8timesPath = path.join(par8timesDirPath, par8timesFileName); | 78 final par8timesPath = path.join(par8timesDirPath, par8timesFileName); |
| 78 final tmpPar8timesPath = path.join(tmpDirPath, par8timesFileName); | 79 final tmpPar8timesPath = path.join(tmpDirPath, par8timesFileName); |
| 79 | 80 |
| 80 // file names paths for output | 81 // file names paths for output |
| 81 final hashName = par8timesName + "-hash"; | 82 final hashName = par8timesName + "-hash"; |
| 82 final hashFileName = "$hashName.tex"; | 83 final hashFileName = "$hashName.tex"; |
| 83 final hashPath = path.join(tmpDirPath, hashFileName); | 84 final hashPath = path.join(tmpDirPath, hashFileName); |
| 84 final listName = par8timesName + "-list"; | 85 final listName = par8timesName + "-list"; |
| 85 final listFileName = "$listName.txt"; | 86 final listFileName = "$listName.txt"; |
| 86 final listPath = path.join(tmpDirPath, listFileName); | 87 final listPath = path.join(tmpDirPath, listFileName); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 main([args]) { | 212 main([args]) { |
| 212 testCutMatch(); | 213 testCutMatch(); |
| 213 testSisp(); | 214 testSisp(); |
| 214 | 215 |
| 215 runWithTempDir(testSameHash); | 216 runWithTempDir(testSameHash); |
| 216 // latex and dvi2tty are not installed in the standard test environment | 217 // latex and dvi2tty are not installed in the standard test environment |
| 217 if (args.length > 0 && args[0] == "local") { | 218 if (args.length > 0 && args[0] == "local") { |
| 218 runWithTempDir(testSameDVI); | 219 runWithTempDir(testSameDVI); |
| 219 } | 220 } |
| 220 } | 221 } |
| OLD | NEW |