git @ Cat's Eye Technologies Flobnar / 61c0fa9
Test with both ghc and Hugs. Cat's Eye Technologies 8 years ago
3 changed file(s) with 37 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
5656 -------------
5757
5858 -> Tests for functionality "Interpret Flobnar program"
59
60 -> Functionality "Interpret Flobnar program" is implemented by
61 -> shell command
62 -> "ghc src/Flobnar.hs -e "do c <- readFile \"%(test-body-file)\"; putStr $ showRun c""
6359
6460 Basics of Execution
6561 -------------------
0 module Main where
1
2 import System.Environment
3 import Flobnar
4
5 main = do
6 [fileName] <- getArgs
7 c <- readFile fileName
8 putStr $ showRun c
00 #!/bin/sh
1 falderal -b README.markdown
1
2 if [ x`which ghc` = x -a x`which runhugs` = x ]; then
3 echo "Neither ghc nor runhugs found on search path"
4 exit 1
5 fi
6
7 touch fixture.markdown
8
9 if [ ! x`which ghc` = x ]; then
10 cat >>fixture.markdown <<EOF
11 -> Functionality "Interpret Flobnar program" is implemented by
12 -> shell command
13 -> "ghc src/Flobnar.hs -e "do c <- readFile \"%(test-body-file)\"; putStr $ showRun c""
14
15 EOF
16 fi
17
18 if [ ! x`which runhugs` = x ]; then
19 cat >>fixture.markdown <<EOF
20 -> Functionality "Interpret Flobnar program" is implemented by
21 -> shell command
22 -> "runhugs src/Main.hs %(test-body-file)"
23
24 EOF
25 fi
26
27 falderal -b fixture.markdown README.markdown
28 rm -f fixture.markdown