Skip to content

Commit

Permalink
ts: test source-sh --ignore option
Browse files Browse the repository at this point in the history
  • Loading branch information
xdelaruelle committed Feb 11, 2024
1 parent 0d53ae7 commit 1ac6bd2
Show file tree
Hide file tree
Showing 3 changed files with 565 additions and 0 deletions.
60 changes: 60 additions & 0 deletions testsuite/modulefiles.4/source-sh/1
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#%Module
if {[info exists env(TESTSUITE_SOURCE_SH)]} {
switch -- $env(TESTSUITE_SOURCE_SH) {
ignore_bad1 {
source-sh --ignore alias
}
ignore_bad2 {
source-sh --ignore
}
ignore_bad3 {
source-sh --ignore bash testsuite/example/sh-to-mod.sh arg1
}
ignore_bad4 {
source-sh --ignore {foo} bash testsuite/example/sh-to-mod.sh arg1
}
ignore_bad5 {
source-sh --ignore alias:foo bash testsuite/example/sh-to-mod.sh arg1
}
ignore_bad6 {
source-sh --ignore foo:bar bash testsuite/example/sh-to-mod.sh arg1
}
ignore_bad7 {
source-sh --ignore {alias function} bash testsuite/example/sh-to-mod.sh arg1
}
ignore_bad8 {
source-sh --foo bash testsuite/example/sh-to-mod.sh arg1
}
ignore_bad9 {
source-sh --ignore alias bash
}
ignore_pos1 {
source-sh bash --ignore envvar:chdir testsuite/example/sh-to-mod.sh
}
ignore_pos2 {
source-sh bash testsuite/example/sh-to-mod.sh --ignore complete
}
ignore_empty1 {
source-sh --ignore {} bash testsuite/example/sh-to-mod.sh arg1
}
ignore1 {
source-sh --ignore alias bash testsuite/example/sh-to-mod.sh
}
ignore2 {
source-sh --ignore alias:function bash testsuite/example/sh-to-mod.sh arg1
}
ignore3 {
source-sh --ignore envvar:chdir bash testsuite/example/sh-to-mod.sh
}
ignore4 {
source-sh --ignore complete bash testsuite/example/sh-to-mod.sh
}
ignore5 {
source-sh --ignore alias:envvar:function:complete bash testsuite/example/sh-to-mod.sh
}
ignore6 {
source-sh --ignore chdir:alias:envvar:function:complete bash testsuite/example/sh-to-mod.sh
}
}
}
module-whatis [module-info name]
2 changes: 2 additions & 0 deletions testsuite/modulefiles.4/source-sh/2
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#%Module
module-whatis [module-info name]
Loading

0 comments on commit 1ac6bd2

Please sign in to comment.