diff options
Diffstat (limited to 'testsuite/tests/ghci/prog002/prog002.script')
-rw-r--r-- | testsuite/tests/ghci/prog002/prog002.script | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/prog002/prog002.script b/testsuite/tests/ghci/prog002/prog002.script new file mode 100644 index 0000000000..cecbe4091a --- /dev/null +++ b/testsuite/tests/ghci/prog002/prog002.script @@ -0,0 +1,45 @@ +:unset +s +:unset +t + +:l ../shell.hs +:def shell (\s -> do shell s; return "") + +-- first, clean up: +:shell rm -f *.hi *.o *~ +:shell cp A1.hs A.hs + +:load D.hs + +-- compile A & reload +:shell "$HC" $HC_OPTS -fforce-recomp -c A.hs +:reload + +B.g 42 +B.g 42 +B.g 42 + +-- swap A2 for A, compile & reload +:shell sleep 1 +:shell cp A2.hs A.hs +:shell "$HC" $HC_OPTS -fforce-recomp -c A.hs +:reload +-- the system should ignore the compiled version and compile its own. + +B.g 42 +B.g 42 +B.g 42 + +-- pick up newly compiled A +:load D.hs + +B.g 42 +B.g 42 +B.g 42 + +-- remove A.o: system should recompile A +:shell rm A.o +:reload + +B.g 42 +B.g 42 +B.g 42 |