File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ JS_SLANG="node node_modules/js-slang/dist/repl/repl.js"
55SOURCEFILES=src/* /* .js
66SOURCE_TEST=" src/test/framework/main.js"
77
8- DEFAULT_CHAP =4
8+ DEFAULT_CHAPTER =4
99DEFAULT_VARIANT=" default"
1010
1111red=` tput setaf 1`
@@ -69,17 +69,17 @@ main() {
6969 # call test_source on each test case in __tests__
7070 for i in " $DIR /__tests__/$( basename ${s} .js) " .*
7171 do
72- # check if first line of test file contains 'chap =' and retrieve its value. Set to the default chapter if it does not
73- chap =$( awk -F ' chap =' ' FNR==1{ if ($0~"chap =") { print $2 } else { print ' $DEFAULT_CHAP ' } }' $i | awk -F ' ' ' { print $1 }' )
72+ # check if first line of test file contains 'chapter =' and retrieve its value. Set to the default chapter if it does not
73+ chapter =$( awk -F ' chapter =' ' FNR==1{ if ($0~"chapter =") { print $2 } else { print ' $DEFAULT_CHAPTER ' } }' $i | awk -F ' ' ' { print $1 }' )
7474
7575 # check if first line of test file contains 'variant=' and retrieve its value. Set to the default variant if it does not
7676 variant=$( awk -F ' variant=' ' FNR==1{ if ($0~"variant=") { print $2 } else { print ' $DEFAULT_VARIANT ' } }' $i | awk -F ' ' ' { print $1 }' )
7777
7878 # check if first line of test file contains 'source-test'
7979 use_source_test=$( awk ' FNR==1{ if ($0~"source-test") print "yes" }' $i )
8080 if [[ $use_source_test == " yes" ]]
81- then chap =4 ; test_source_framework $s $i $chap $variant
82- else test_source $s $i $chap $variant
81+ then chapter =4 ; test_source_framework $s $i $chapter $variant
82+ else test_source $s $i $chapter $variant
8383 fi
8484 done
8585 fi
You can’t perform that action at this time.
0 commit comments