Skip to content
Browse files

sm test accepts now list of modules to include

  • Loading branch information...
1 parent 38dbff3 commit 0ab39fff43a48c898698d9488eea9261f549d109 @mpapis mpapis committed
View
1 core/cli/map
@@ -105,5 +105,6 @@ cron/edit/group=cron/__sm.cron.edit.group()
cron/show/group=cron/__sm.cron.show.group()
cron/remove/group=cron/__sm.cron.remove.group()
test/ext=test/__sm.cli.test.extension()
+test/set=test/__sm.cli.test.set()
test/sm=test/__sm.cli.test.sm()
test=test/__sm.cli.test.help()
View
35 core/cli/shell/test/functions
@@ -3,6 +3,29 @@
__sm.cli.test.help()
{
+ printf "%b" "
+Helper for testing SM Framework and extensions.
+
+Usage - help:
+
+ sm test [help]
+
+Usage - testing sm (has to be run from sm root):
+
+ #!/usr/bin/env zsh
+ eval \$( ./local test sm [module/to/include ...] )
+
+Usage - testing extension sets (has to be run from set root):
+
+ #!/usr/bin/env zsh
+ eval \$( sm test set [module/to/include ...] )
+
+Usage - testing extensions (has to be run from extensions root):
+
+ #!/usr/bin/env zsh
+ eval \$( sm test ext [module/to/include ...] )
+
+"
}
__sm.cli.test.sm()
@@ -18,6 +41,11 @@ trap - USR2 ;
trap - ZERR ;
popd >/dev/null ;
"
+ while (( $# ))
+ do
+ printf "%b" "includes \"$1\" ;\n"
+ shift
+ done
}
__sm.cli.test.extension()
@@ -25,8 +53,13 @@ __sm.cli.test.extension()
printf "%b" "
export extensions_search_paths_here=\"\$PWD\";
"
- __sm.cli.test.sm
+ __sm.cli.test.sm "$@"
printf "%b" "
initial_pwd=\"\$PWD\";
"
}
+
+__sm.cli.test.set()
+{
+ __sm.cli.test.extension "$@"
+}
View
3 core/internal/shell/files/files_comment_test.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env zsh
-eval $(./local test sm)
-includes internal/files
+eval $(./local test sm internal/files )
: readlinks
touch "${sm_temp_path}/a"
View
3 core/internal/shell/variables/file/multiple_file_comment_test.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env zsh
-eval $(./local test sm)
-includes internal/variables/file
+eval $(./local test sm internal/variables/file )
: read one
unset var1 var2
View
3 core/internal/shell/variables/file/simple_file_comment_test.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env zsh
-eval $(./local test sm)
-includes internal/variables/file
+eval $(./local test sm internal/variables/file )
export _sm_version_read1 _sm_version_read2
__sm_variables_file_read _sm_version_read1 VERSION
View
3 core/internal/shell/version/stream/version_stream_comment_test.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env zsh
-eval $(./local test sm)
-includes internal/version/stream
+eval $(./local test sm internal/version/stream )
: simple read/write
View
3 core/internal/shell/version/version_compare_comment_test.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env zsh
-eval $(./local test sm)
-includes internal/version
+eval $(./local test sm internal/version )
: basic comparision
__sm.version.compare 1 -gt 2 # status!=0

0 comments on commit 0ab39ff

Please sign in to comment.
Something went wrong with that request. Please try again.