Chromium Code Reviews| Index: tests/standalone/io/addlatexhash_test.dart |
| diff --git a/tests/standalone/io/addlatexhash_test.dart b/tests/standalone/io/addlatexhash_test.dart |
| index dbefe39ff8a352f7a3b08c8b0342c5edd8b6f59f..f6be85b948207900a49461cfaf39db9464b51788 100755 |
| --- a/tests/standalone/io/addlatexhash_test.dart |
| +++ b/tests/standalone/io/addlatexhash_test.dart |
| @@ -59,11 +59,7 @@ testSisp() { |
| // LaTeX source 'addlatexhash_test_src.tex' are identical in groups |
| // of eight (so we get 8 identical hash values, then another hash |
| // value 8 times, etc.) |
| -testSameHash() { |
| - // set up temporary directory to hold output |
| - final tmpDir = Directory.systemTemp.createTempSync("addlatexhash_test"); |
| - final tmpDirPath = tmpDir.path; |
| - |
| +testSameHash(String tmpDirPath) { |
| // file names/paths for file containing groups of 8 variants of a paragraph |
| const par8timesName = "addlatexhash_test_src"; |
| const par8timesFileName = "$par8timesName.tex"; |
| @@ -120,11 +116,7 @@ testSameHash() { |
| // does not affect the generated output, as seen via dvi2tty and diff. |
| // NB: Not part of normal testing (only local): latex and dvi2tty are |
| // not installed in the standard test environment. |
| -testSameDVI() { |
| - // set up /tmp directory to hold output |
| - final tmpDir = Directory.systemTemp.createTempSync("addlatexhash_test"); |
| - final tmpDirPath = tmpDir.path; |
| - |
| +testSameDVI(String tmpDirPath) { |
| // file names/paths for original spec |
| const specName = "dartLangSpec"; |
| const specFileName = "$specName.tex"; |
| @@ -192,7 +184,20 @@ testSameDVI() { |
| main([args]) { |
| testCutMatch(); |
| testSisp(); |
| - testSameHash(); |
| + |
| + final tmpDir = Directory.systemTemp.createTempSync("addlatexhash_test"); |
| + try { |
| + testSameHash(tmpDir.path); |
| + } finally { |
| + tmpDir.delete(recursive: true); |
| + } |
| // latex and dvi2tty are not installed in the standard test environment |
| - if (args.length > 0 && args[0] == "local") testSameDVI(); |
| + if (args.length > 0 && args[0] == "local") { |
| + final dviDir = Directory.systemTemp.createTempSync("addlatexhash_test"); |
| + try { |
| + testSameDVI(dviDir.path); |
| + } finally { |
| + dviDir.delete(recursive: true); |
| + } |
| + } |
|
eernst
2015/01/28 13:04:35
Ah, of course I should have removed those tmp file
|
| } |