Commit b153f49b authored by Markus Klinik's avatar Markus Klinik
Browse files

test.sh: accept command line arguments

parent abcc4bf3
......@@ -5,8 +5,17 @@ RASCAL_JAR=$(readlink -f rascal-shell-unstable.jar)
cd src
# if no command line arguments are given, execute all *Spec.rsc
# if command line arguments are given, test only those files
if [ $# -eq 0 ]
then
SPEC_FILES=*Spec.rsc
else
SPEC_FILES=$@
fi
# generate import statements for all files named *Spec.rsc
( ls *Spec.rsc | sed "s/\(.*\).rsc/import \1;/"
( ls $SPEC_FILES | sed "s/\(.*\).rsc/import \1;/"
echo ":test"
) |\
# pipe the import statements to the rascal shell
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment