| Index: utils/tests/template/run
|
| diff --git a/utils/tests/template/run b/utils/tests/template/run
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..71adcabc057048e7fb931a8915c3ebd790eaa78d
|
| --- /dev/null
|
| +++ b/utils/tests/template/run
|
| @@ -0,0 +1,91 @@
|
| +#!/bin/bash
|
| +
|
| +# get the number of command-line arguments given
|
| +ARGC=$#
|
| +
|
| +if [[ $ARGC -eq 1 ]];
|
| +then
|
| + if [[ $1 = "simple1" ]];
|
| + then
|
| + ./../../template/template name_entry.tmpl name_entry.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/test_simple.dart
|
| + elif [[ $1 == "simple2" ]];
|
| + then
|
| + ./../../template/template name_entry2.tmpl name_entry.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/test_simple.dart
|
| + elif [[ $1 == "simple3" ]];
|
| + then
|
| + ./../../template/template name_entry_css.tmpl name_entry.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/test_simple.dart
|
| + elif [[ $1 == "with1" ]];
|
| + then
|
| + ./../../template/template productview.tmpl productview.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/test_with.dart
|
| + elif [[ $1 == "with2" ]];
|
| + then
|
| + ./../../template/template productview2.tmpl productview.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/test_with.dart
|
| + elif [[ $1 == "list" ]];
|
| + then
|
| + ./../../template/template applications.tmpl applications.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/test_list.dart
|
| + elif [[ $1 == "complex" ]];
|
| + then
|
| + ./../../template/template top_searches.tmpl top_searches.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/test_complex.dart
|
| + elif [[ $1 == "complexcss" ]];
|
| + then
|
| + ./../../template/template top_searches_css.tmpl top_searches.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/test_complex.dart
|
| + elif [[ $1 == "complex2" ]];
|
| + then
|
| + ./../../template/template top_searches2.tmpl top_searches2.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/test_complex2.dart
|
| + elif [[ $1 == "real" ]];
|
| + then
|
| + ./../../template/template realviews.tmpl realviews.dart
|
| + cd ../../../frog
|
| + ./frog.py --html -- ../utils/tests/template/real_app.dart
|
| + elif [[ $1 == "clean" ]];
|
| + then
|
| + # remove all generated templates
|
| + echo "rm name_entry.dart"
|
| + rm -f name_entry.dart
|
| + echo "rm productview.dart"
|
| + rm -f productview.dart
|
| + echo "rm applications.dart"
|
| + rm -f applications.dart
|
| + echo "rm top_searches.dart"
|
| + rm -f top_searches.dart
|
| + echo "rm top_searches2.dart"
|
| + rm -f top_searches2.dart
|
| + echo "rm realviews.dart"
|
| + rm -f realviews.dart
|
| + fi
|
| +else
|
| + echo -e "\033[31mUnknown test\033[0m"
|
| + echo -e ""
|
| + echo -e "Known tests are:"
|
| + echo -e " simple1"
|
| + echo -e " simple2"
|
| + echo -e " simple3"
|
| + echo -e " with1"
|
| + echo -e " with2"
|
| + echo -e " list"
|
| + echo -e " complex"
|
| + echo -e " complexcss"
|
| + echo -e " complex2"
|
| + echo -e " real"
|
| + echo -e ""
|
| + echo -e "clean - removes all template generated Dart classes"
|
| +fi
|
| +
|
|
|