File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 33
44if [ -z " ${BF} " ]; then
55 BF=" ` realpath brainfunk` "
6+ else
7+ BF=" ` realpath $BF ` "
68fi
79
810msg_echo ()
@@ -19,6 +21,7 @@ fetch()
1921{
2022 local url=" $1 "
2123 if [ -f " ${i##*/ } " ]; then
24+ msg_echo " Fetching $url "
2225 curl -OJv " $url "
2326 fi
2427}
@@ -35,10 +38,10 @@ test_from_url()
3538
3639
3740msg_echo " Testing Basic Loop, see if it coredumps" " -[>+<-]"
38- ( ${BF} -c ' -[>+<-]' ) && response " PASS"
41+ ( ${BF} -c ' -[>+<-]' ) && response " PASS" || response " FAIL "
3942
4043msg_echo " Hello World Test"
41- ( ${BF} -c ' ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.' ) && response " PASS"
44+ ( ${BF} -c ' ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.' ) && response " PASS" || response " FAIL "
4245
4346msg_echo " Downloading More Tests from Internet"
4447mkdir -p test
@@ -49,9 +52,7 @@ tar -xpf brainf_progs.tar
4952
5053for i in bench.b long.b; do
5154 msg_echo " Testing ${i% .b} "
52- ${BF} -f $i && response " PASS"
55+ ${BF} -f $i && response " PASS" || response " FAIL "
5356done
5457
5558test_from_url https://raw.githubusercontent.com/pablojorge/brainfuck/master/programs/sierpinski.bf
56-
57- cd ..
You can’t perform that action at this time.
0 commit comments