on master help sign in
Infrastructure for passing of parameters to idris during tests
2c6ad9bBenjamin Saunders
test/mktest.pl+1−1
@@ -13,7 +13,7 @@ chdir($test);
13open(FOO,">run");
13open(FOO,">run");
14
14
15print FOO "#!/bin/bash\n";
15print FOO "#!/bin/bash\n";
16−print FOO "idris $test.idr -o $test\n";
16+print FOO "idris \$@ $test.idr -o $test\n";
17print FOO "./$test\n";print FOO "rm -f $test *.ibc\n";
17print FOO "./$test\n";print FOO "rm -f $test *.ibc\n";
18
18
19close(FOO);
19close(FOO);
test/runtest.pl+2−1
@@ -8,7 +8,7 @@ sub runtest {
8 chdir($test);
8 chdir($test);
9
9
10 print "Running $test...";
10 print "Running $test...";
11− $got = `sh ./run`;
11+ $got = `sh ./run @idrOpts`;
12 $exp = `cat expected`;
12 $exp = `cat expected`;
13
13
14 open(OUT,">output");
14 open(OUT,">output");
@@ -59,6 +59,7 @@ if ($#ARGV>=0) {
59$update=0;
59$update=0;
60$diff=0;
60$diff=0;
61$show=0;
61$show=0;
62+@idrOpts=();
62
63
63while ($opt=shift(@opts)) {
64while ($opt=shift(@opts)) {
64 if ($opt eq "-u") { $update = 1; }
65 if ($opt eq "-u") { $update = 1; }
test/test001/run+1−1
@@ -1,4 +1,4 @@
1#!/bin/bash
1#!/bin/bash
2−idris test001.idr -o test001
2+idris $@ test001.idr -o test001
3./test001
3./test001
4rm -f test001 test001.ibc
4rm -f test001 test001.ibc
test/test002/run+1−1
@@ -1,3 +1,3 @@
1#!/bin/bash
1#!/bin/bash
2−idris test002.idr --check --noprelude
2+idris $@ test002.idr --check --noprelude
3
3
test/test003/run+2−2
@@ -1,5 +1,5 @@
1#!/bin/bash
1#!/bin/bash
2−idris test003a.lidr --check
2+idris $@ test003a.lidr --check
3−idris test003.lidr -o test003
3+idris $@ test003.lidr -o test003
4./test003
4./test003
5rm -f test003 test003.ibc Lit.ibc
5rm -f test003 test003.ibc Lit.ibc
test/test004/run+1−1
@@ -1,4 +1,4 @@
1#!/bin/bash
1#!/bin/bash
2−idris test004.idr -o test004
2+idris $@ test004.idr -o test004
3./test004
3./test004
4rm -f test004 test004.ibc testfile
4rm -f test004 test004.ibc testfile
test/test005/run+1−1
@@ -1,4 +1,4 @@
1#!/bin/bash
1#!/bin/bash
2−idris test005.idr -o test005
2+idris $@ test005.idr -o test005
3./test005
3./test005
4rm -f test005 test005.ibc
4rm -f test005 test005.ibc
test/test006/run+1−1
@@ -1,4 +1,4 @@
1#!/bin/bash
1#!/bin/bash
2−idris test006.idr -o test006
2+idris $@ test006.idr -o test006
3./test006
3./test006
4rm -f test006 test006.ibc
4rm -f test006 test006.ibc
test/test007/run+1−1
@@ -1,4 +1,4 @@
1#!/bin/bash
1#!/bin/bash
2−idris test007.idr -o test007
2+idris $@ test007.idr -o test007
3./test007
3./test007
4rm -f test007 test007.ibc
4rm -f test007 test007.ibc
test/test008/run+1−1
@@ -1,4 +1,4 @@
1#!/bin/bash
1#!/bin/bash
2−idris test008.idr -o test008
2+idris $@ test008.idr -o test008
3./test008
3./test008
4rm -f test008 test008.ibc
4rm -f test008 test008.ibc
test/test009/run+1−1
@@ -1,4 +1,4 @@
1#!/bin/bash
1#!/bin/bash
2−idris test009.idr -o test009
2+idris $@ test009.idr -o test009
3./test009
3./test009
4rm -f test009 test009.ibc
4rm -f test009 test009.ibc
test/test010/run+3−3
@@ -1,6 +1,6 @@
1#!/bin/bash
1#!/bin/bash
2−idris test010.idr -o test010
2+idris $@ test010.idr -o test010
3−idris test010a.idr -o test010
3+idris $@ test010a.idr -o test010
4−idris test010b.idr -o test010
4+idris $@ test010b.idr -o test010
5
5
6rm -f *.ibc
6rm -f *.ibc
test/test011/run+1−1
@@ -1,4 +1,4 @@
1#!/bin/bash
1#!/bin/bash
2−idris test011.idr -o test011
2+idris $@ test011.idr -o test011
3./test011
3./test011
4rm -f test011 test011.ibc
4rm -f test011 test011.ibc
test/test012/run+1−1
@@ -1,2 +1,2 @@
1#!/bin/bash
1#!/bin/bash
2−idris test012a.idr -o test012a
2+idris $@ test012a.idr -o test012a
test/test013/run+1−1
@@ -1,4 +1,4 @@
1#!/bin/bash
1#!/bin/bash
2−idris test013.idr -o test013
2+idris $@ test013.idr -o test013
3./test013
3./test013
4rm -f test013 test013.ibc
4rm -f test013 test013.ibc