|
@@ -11,6 +11,7 @@ tf_enum_subtests() {
|
11
|
11
|
echo "try_import_var_fn"
|
12
|
12
|
echo "import_var_fn_bash"
|
13
|
13
|
echo "import_var_fn_bash_hint"
|
|
14
|
+ echo "ls_imported"
|
14
|
15
|
}
|
15
|
16
|
|
16
|
17
|
ignored() {
|
|
@@ -51,6 +52,7 @@ mksnippet() {
|
51
|
52
|
# File _ignored_ is used as list of tokens to always
|
52
|
53
|
# remove from the info.
|
53
|
54
|
#
|
|
55
|
+ test "$name" == ls_imported && return 0
|
54
|
56
|
local target="$1"
|
55
|
57
|
printf "
|
56
|
58
|
{
|
|
@@ -88,6 +90,11 @@ mktscript_body() {
|
88
|
90
|
try_import_fn) echo 'shellfu try_import mod_f' ;;
|
89
|
91
|
try_import_var) echo 'shellfu try_import mod_v' ;;
|
90
|
92
|
try_import_var_fn) echo 'shellfu try_import mod_v_f' ;;
|
|
93
|
+ ls_imported) echo 'shellfu import mod_v_f'
|
|
94
|
+ echo 'shellfu try_import mod_v_f_bash'
|
|
95
|
+ echo 'shellfu import mod_v'
|
|
96
|
+ echo 'shellfu import mod_v_f'
|
|
97
|
+ echo 'shellfu ls_imported' ;;
|
91
|
98
|
esac
|
92
|
99
|
}
|
93
|
100
|
|
|
@@ -119,9 +126,16 @@ tf_do_subtest() {
|
119
|
126
|
#
|
120
|
127
|
local name="$1"
|
121
|
128
|
mktscript "$name" > "$name.sh"
|
|
129
|
+
|
122
|
130
|
mkdir -p result
|
123
|
131
|
chmod +x "$name.sh"
|
124
|
|
- env -i PATH="$PATH" SHELLFU_DIR="$SHELLFU_DIR" ./"$name.sh"
|
|
132
|
+ env -i PATH="$PATH" SHELLFU_DIR="$SHELLFU_DIR" ./"$name.sh" \
|
|
133
|
+ >"result/$name.out" 2>"result/$name.err"
|
|
134
|
+ test "$name" == ls_imported && {
|
|
135
|
+ diff -u "oracle/$name.out" "result/$name.out" || return 1
|
|
136
|
+ diff -u "oracle/$name.err" "result/$name.err" || return 1
|
|
137
|
+ return 0
|
|
138
|
+ }
|
125
|
139
|
comm -13 "$name.before" "$name.after" > "result/$name.new"
|
126
|
140
|
# i.e. lines introduced by import ^^
|
127
|
141
|
diff -u "oracle/$name.new" "result/$name.new"
|