Skip to content

Commit d9c9abb

Browse files
committed
ts: test one variant set multiple times for EMS
1 parent d46beea commit d9c9abb

File tree

6 files changed

+49
-0
lines changed

6 files changed

+49
-0
lines changed

testsuite/modules.51-scan/030-scan_eval-avail.exp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,19 @@ testouterr_cmd sh {avail -t diralscan foo=val2} OK {}
615615
testouterr_cmd sh {avail -t diralscan/1.0 foo=val2} OK {}
616616

617617

618+
#
619+
# same variant specified several times
620+
#
621+
622+
setenv_var TESTSUITE_SCAN variant1
623+
624+
set tserr "scan/2.0{foo=val1,val2,val3}
625+
scan/2.1{foo=val1,val2,val3}"
626+
testouterr_cmd sh {avail -t scan foo=val1 foo=val2} OK $tserr
627+
testouterr_cmd sh {avail -t scan foo=val1 foo=val4 foo=val2} OK {}
628+
testouterr_cmd sh {avail -t scan foo=val2 foo=val4} OK {}
629+
630+
618631
#
619632
# Cleanup
620633
#

testsuite/modules.51-scan/031-scan_eval-whatis.exp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,20 @@ if {[info exists env(TESTSUITE_ENABLE_MODULECACHE)]} {
408408
}
409409

410410

411+
#
412+
# same variant specified several times
413+
#
414+
415+
setenv_var TESTSUITE_SCAN variant1
416+
417+
set tserr "$modlin $mpre $modlin
418+
\\s+scan/2.0: scan/2.0
419+
\\s+scan/2.1: scan/2.1"
420+
testouterr_cmd_re sh {whatis scan foo=val1 foo=val2} OK $tserr
421+
testouterr_cmd_re sh {whatis scan foo=val1 foo=val4 foo=val2} ERR "$err_path'scan foo=val1 foo=val4 foo=val2'"
422+
testouterr_cmd_re sh {whatis scan foo=val2 foo=val4} ERR "$err_path'scan foo=val2 foo=val4'"
423+
424+
411425
#
412426
# Cleanup
413427
#

testsuite/modules.51-scan/032-scan_eval-paths.exp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,19 @@ if {[info exists env(TESTSUITE_ENABLE_MODULECACHE)]} {
360360
}
361361

362362

363+
#
364+
# same variant specified several times
365+
#
366+
367+
setenv_var TESTSUITE_SCAN variant1
368+
369+
set ans [list]
370+
lappend ans [list text $mp/scan/2.0]
371+
testouterr_cmd sh {paths scan foo=val1 foo=val2} $ans {}
372+
testouterr_cmd sh {paths scan foo=val1 foo=val4 foo=val2} OK {}
373+
testouterr_cmd sh {paths scan foo=val2 foo=val4} OK {}
374+
375+
363376
#
364377
# Cleanup
365378
#

testsuite/modules.51-scan/040-extra_spec.exp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ setenv_var TESTSUITE_EXTRA vr1
161161
set tserr extra/1.0
162162
testouterr_cmd sh {avail -t extra xtfoo=val2 variant:xtbar} OK $tserr
163163
testouterr_cmd sh {avail -t extra xtfoo=val2 variant:xtfoo} OK $tserr
164+
testouterr_cmd sh {avail -t extra xtfoo=val2 xtfoo=val1 variant:xtfoo} OK $tserr
164165
testouterr_cmd sh {avail -t extra xtfoo=val5 variant:xtfoo} OK {}
166+
testouterr_cmd sh {avail -t extra xtfoo=val5 xtfoo=val2 variant:xtfoo} OK {}
165167
testouterr_cmd sh {avail -t extra xtfoo=val2 variant:unk} OK {}
166168
testouterr_cmd sh {avail -t extra xtfoo=val5 variant:unk} OK {}
167169
testouterr_cmd sh {avail -t xtfoo=val2 variant:xtbar} OK $tserr

testsuite/modules.70-maint/370-variant.exp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,13 @@ set tserr "$modlin $mpre $modlin\nvariant/6.0{bar=1,2,3:foo=val1,val2,val3} "
393393
testouterr_cmd_re sh {avail [email protected] foo=val1 baz=2} OK {}
394394
testouterr_cmd_re sh {avail [email protected] foo=val4 bar=1} OK {}
395395
testouterr_cmd_re sh {avail [email protected] foo=val4} OK {}
396+
testouterr_cmd_re sh {avail [email protected] foo=val4 foo=val1} OK {}
396397
testouterr_cmd_re sh {avail [email protected] baz=3} OK {}
398+
testouterr_cmd_re sh {avail [email protected] foo=val1 foo=val2} OK $tserr
397399
testouterr_cmd_re sh {avail [email protected] foo=val1 bar=2} OK $tserr
400+
testouterr_cmd_re sh {avail [email protected] foo=val1 bar=2 bar=1} OK $tserr
401+
testouterr_cmd_re sh {avail [email protected] foo=val1 bar=2 bar=4} OK {}
402+
testouterr_cmd_re sh {avail [email protected] foo=val1 bar=4 bar=1} OK {}
398403
testouterr_cmd_re sh {avail [email protected] foo=val1 bar=1} OK $tserr
399404
testouterr_cmd_re sh {avail [email protected] foo=val1} OK $tserr
400405
setenv_var MODULES_AVAIL_OUTPUT {modulepath:alias:dirwsym:sym:tag}

testsuite/modules.70-maint/375-variant-whatis.exp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ setenv_var TESTSUITE_VARIANT 1
3333
set tserr "$modlin $mpre $modlin
3434
\\s+variant/6.0: variant/6.0"
3535
testouterr_cmd_re sh {whatis variant/6.0 foo=val1 bar=2} OK $tserr
36+
testouterr_cmd_re sh {whatis variant/6.0 foo=val3 foo=val1 bar=2} OK $tserr
3637
testouterr_cmd_re sh {whatis variant/6.0} OK $tserr
3738
testouterr_cmd_re sh {whatis variant/6.0 unk=val} ERR "$err_path'variant/6.0 unk=val'"
39+
testouterr_cmd_re sh {whatis variant/6.0 foo=val4 foo=val1 bar=2} ERR "$err_path'variant/6.0 foo=val4 foo=val1 bar=2'"
3840

3941
testouterr_cmd_re sh {search variant} OK $tserr
4042
testouterr_cmd_re sh {search variant/6.0} OK $tserr

0 commit comments

Comments
 (0)