bin: support multi-line CSV fields.

* src/bin/common_finput.cc (job_processor::process_stream): Read
multi-line CSV fields.
* src/ltltest/lbt.test, src/tgbatest/nondet.test: Add tests.
This commit is contained in:
Alexandre Duret-Lutz 2013-12-06 13:45:55 +01:00
parent 6c21089599
commit f0bcab4add
3 changed files with 53 additions and 14 deletions

View file

@ -29,7 +29,7 @@ G(!r | Fa) | Fx, 0 1
EOF
# also test the filename/COL syntax
../../bin/ltl2tgba -F expected.1/1 --stats='%f, %d %p' >out.1
run 0 ../../bin/ltl2tgba -F expected.1/1 --stats='%f, %d %p' >out.1
diff out.1 expected.1
cat >expected.2<<EOF
@ -40,11 +40,23 @@ G(!r | Fa) | Fx, 0 1
EOF
# filename/COL should also work when filename=-
../../bin/ltl2tgba -C -F-/1 --stats='%f, %d %p' <expected.2 >out.2
run 0 ../../bin/ltl2tgba -C -F-/1 --stats='%f, %d %p' <expected.2 >out.2
diff out.2 expected.2
# Test multi-line CSV fields.
cat >in.2b<<EOF
FGa, 0 1
GFa, 1 1
a U b, 1 1
"G(!r | Fa)
|
Fx", 0 1
EOF
run 0 ../../bin/ltl2tgba -C -Fin.2b/1 --stats='%f, %d %p' >out.2b
diff out.2b expected.2
../../bin/ltl2tgba FGa GFa --stats='%f %d %n %s %p' >out.3
run 0 ../../bin/ltl2tgba FGa GFa --stats='%f %d %n %s %p' >out.3
cat >expected.3<<EOF
FGa 0 1 2 0
GFa 1 0 1 1
@ -53,7 +65,7 @@ EOF
diff out.3 expected.3
../../bin/ltl2tgba -DC FGa GFa --stats='%f %d %n %s %p' >out.4
run 0 ../../bin/ltl2tgba -DC FGa GFa --stats='%f %d %n %s %p' >out.4
cat >expected.4<<EOF
FGa 0 1 3 1
GFa 1 0 1 1