Closed sydb closed 8 months ago
Note — not passing tests yet. (I forgot all about them.) Reviewers should feel free to test now or wait until tests are passing.
Craziness — I just discovered that running cd Stylesheets/ ; make test
does run the clean: target in the Test/Makefile, but running cd Stylesheets/Test/ ; make
does not.
In any case, I think I finally have the tests working. If anyone is interested, here is how you can rename every file named “A.xml.B.ext” to just “A.B.ext”:
$ for f in *.xml.*; do echo "---------$f:" ; git mv $f ${f%.xml.*}.${f##*.xml.} ; done
Per #543, strip off the input file’s extension (if it is one of the extensions we know about, that is) before appending the output file extension.
Code seems to work, but some serious testing is in order. Reviewers should test the code by trying several cases of things like the following, in with no output specified, with an output filename specified that is in the same dir as input, in current dir, or in a different dir altogether.
E.g.,
cd ~ ; /path/to/Stylesheets/bin/csvtotei ~/rockyracoon.coseva /tmp/rockyracoon.tei
would be an example of the last with output in a different directory altogether.