Infrastructure for passing of parameters to idris during tests
commit2c6ad9bd83de5be1651258c074ff873f95634c64
authorBenjamin Saunders <besaunde@sfu.ca>
dateWed 31 Oct 2012, 22:16 (14 years ago)
parent96db606
test/mktest.pl+1−1
@@ -13,7 +13,7 @@ chdir($test);
1313open(FOO,">run");
1414
1515print FOO "#!/bin/bash\n";
16−print FOO "idris $test.idr -o $test\n";
16+print FOO "idris \$@ $test.idr -o $test\n";
1717print FOO "./$test\n";print FOO "rm -f $test *.ibc\n";
1818
1919close(FOO);
test/runtest.pl+2−1
@@ -8,7 +8,7 @@ sub runtest {
88 chdir($test);
99
1010 print "Running $test...";
11− $got = `sh ./run`;
11+ $got = `sh ./run @idrOpts`;
1212 $exp = `cat expected`;
1313
1414 open(OUT,">output");
@@ -59,6 +59,7 @@ if ($#ARGV>=0) {
5959$update=0;
6060$diff=0;
6161$show=0;
62+@idrOpts=();
6263
6364while ($opt=shift(@opts)) {
6465 if ($opt eq "-u") { $update = 1; }
test/test001/run+1−1
@@ -1,4 +1,4 @@
11#!/bin/bash
2−idris test001.idr -o test001
2+idris $@ test001.idr -o test001
33./test001
44rm -f test001 test001.ibc
test/test002/run+1−1
@@ -1,3 +1,3 @@
11#!/bin/bash
2−idris test002.idr --check --noprelude
2+idris $@ test002.idr --check --noprelude
33
test/test003/run+2−2
@@ -1,5 +1,5 @@
11#!/bin/bash
2−idris test003a.lidr --check
3−idris test003.lidr -o test003
2+idris $@ test003a.lidr --check
3+idris $@ test003.lidr -o test003
44./test003
55rm -f test003 test003.ibc Lit.ibc
test/test004/run+1−1
@@ -1,4 +1,4 @@
11#!/bin/bash
2−idris test004.idr -o test004
2+idris $@ test004.idr -o test004
33./test004
44rm -f test004 test004.ibc testfile
test/test005/run+1−1
@@ -1,4 +1,4 @@
11#!/bin/bash
2−idris test005.idr -o test005
2+idris $@ test005.idr -o test005
33./test005
44rm -f test005 test005.ibc
test/test006/run+1−1
@@ -1,4 +1,4 @@
11#!/bin/bash
2−idris test006.idr -o test006
2+idris $@ test006.idr -o test006
33./test006
44rm -f test006 test006.ibc
test/test007/run+1−1
@@ -1,4 +1,4 @@
11#!/bin/bash
2−idris test007.idr -o test007
2+idris $@ test007.idr -o test007
33./test007
44rm -f test007 test007.ibc
test/test008/run+1−1
@@ -1,4 +1,4 @@
11#!/bin/bash
2−idris test008.idr -o test008
2+idris $@ test008.idr -o test008
33./test008
44rm -f test008 test008.ibc
test/test009/run+1−1
@@ -1,4 +1,4 @@
11#!/bin/bash
2−idris test009.idr -o test009
2+idris $@ test009.idr -o test009
33./test009
44rm -f test009 test009.ibc
test/test010/run+3−3
@@ -1,6 +1,6 @@
11#!/bin/bash
2−idris test010.idr -o test010
3−idris test010a.idr -o test010
4−idris test010b.idr -o test010
2+idris $@ test010.idr -o test010
3+idris $@ test010a.idr -o test010
4+idris $@ test010b.idr -o test010
55
66rm -f *.ibc
test/test011/run+1−1
@@ -1,4 +1,4 @@
11#!/bin/bash
2−idris test011.idr -o test011
2+idris $@ test011.idr -o test011
33./test011
44rm -f test011 test011.ibc
test/test012/run+1−1
@@ -1,2 +1,2 @@
11#!/bin/bash
2−idris test012a.idr -o test012a
2+idris $@ test012a.idr -o test012a
test/test013/run+1−1
@@ -1,4 +1,4 @@
11#!/bin/bash
2−idris test013.idr -o test013
2+idris $@ test013.idr -o test013
33./test013
44rm -f test013 test013.ibc