on master help sign in
Make a mechanism for os-dependent output of tests
a6475a2Niklas Larsson
test/interactive007/expected.msysnew file+1
@@ -0,0 +1 @@
1+Idris> *Data\ZZ> *Data\ZZ> *Data\ZZ> *Data\ZZ> Bye bye
test/runtest.pl+8
@@ -30,6 +30,14 @@ sub runtest {
30 my $got = `$sandbox ./run @idrOpts`;
30 my $got = `$sandbox ./run @idrOpts`;
31 my $exp = `cat expected`;
31 my $exp = `cat expected`;
32
32
33+ # Allow for variant expected output for tests by overriding expected
34+ # when there is an expected.<os> file in the test.
35+ # This should be the exception but there are sometimes valid reasons
36+ # for os-dependent output.
37+ # The endings are msys for windows, darwin for osx and linux for linux
38+ if ( -e "expected.$^O") {
39+ $exp = `cat expected.$^O`;
40+ }
33 open my $out, '>', 'output';
41 open my $out, '>', 'output';
34 print $out $got;
42 print $out $got;
35 close $out;
43 close $out;