Skip to content

Commit 3dd4b44

Browse files
committed
ts: fix contains search-match tests in {90,92}/080
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 5d76c11 commit 3dd4b44

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

testsuite/modules.00-init/005-init_ts.exp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,10 @@ proc if_availindepth {then {else {}}} {
904904
return [expr {$::install_availindepth eq {y} ? $then : $else}]
905905
}
906906

907+
proc if_searchcontains {then {else {}}} {
908+
return [expr {$::install_searchmatch eq {contains} ? $then : $else}]
909+
}
910+
907911
proc if_configlocked {option then {else {}}} {
908912
return [expr {[is_config_locked $option] ? $then : $else}]
909913
}

testsuite/modules.90-avail/080-noindepth.exp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ testouterr_cmd sh {avail -t -d mod1*/*} OK [if_implicitdefault "$mp:\nmod1/2\nmo
180180
testouterr_cmd sh {avail -t -L mod1*/*} OK "$mp:\nmod1/2\nmod11/2"
181181
testouterr_cmd sh {avail -t -d mod1?/} OK [if_implicitdefault "$mp:\nmod11/2"]
182182
testouterr_cmd sh {avail -t -L mod1?/} OK "$mp:\nmod11/2"
183-
#FIXME: issue to fix when --with-search-match=contains
184-
testouterr_cmd sh {avail -t -d mod2?} OK {} xfail
185-
testouterr_cmd sh {avail -t -L mod2?} OK {} xfail
183+
# contains search-match matches "/" character
184+
testouterr_cmd sh {avail -t -d mod2?} OK [if_searchcontains "$mp:\nmod2/" {}]
185+
testouterr_cmd sh {avail -t -L mod2?} OK [if_searchcontains "$mp:\nmod2/" {}]
186186
testouterr_cmd sh {avail -t -d mod2?/} OK {}
187187
testouterr_cmd sh {avail -t -L mod2?/} OK {}
188188
testouterr_cmd sh {avail -t */*/} OK "$mp:\ndeepA/4/1/(ds)\nmod6/3/1/\nmod7/4/1\nmod8/4/1(@)\nmod9/3/2(default)\nmod9/4/1"

testsuite/modules.92-spider/080-spider-noindepth.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ testouterr_cmd sh {spider -t -L mod1*/*} OK "$mp:\nmod1/2\nmod11/2"
181181
testouterr_cmd sh {spider -t -d mod1?/} OK [if_implicitdefault "$mp:\nmod11/2"]
182182
testouterr_cmd sh {spider -t -L mod1?/} OK "$mp:\nmod11/2"
183183
#FIXME: issue to fix when --with-search-match=contains
184-
testouterr_cmd sh {spider -t -d mod2?} OK {} xfail
185-
testouterr_cmd sh {spider -t -L mod2?} OK {} xfail
184+
testouterr_cmd sh {spider -t -d mod2?} OK [if_searchcontains "$mp:\nmod2/" {}]
185+
testouterr_cmd sh {spider -t -L mod2?} OK [if_searchcontains "$mp:\nmod2/" {}]
186186
testouterr_cmd sh {spider -t -d mod2?/} OK {}
187187
testouterr_cmd sh {spider -t -L mod2?/} OK {}
188188
testouterr_cmd sh {spider -t */*/} OK "$mp:\ndeepA/4/1/(ds)\nmod6/3/1/\nmod7/4/1\nmod8/4/1(@)\nmod9/3/2(default)\nmod9/4/1"

0 commit comments

Comments
 (0)