Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tests/support/server.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,9 @@ proc tags_acceptable {tags err_return} {
# doesn't really belong here, but highly coupled to code in start_server
proc tags {tags code} {
# If we 'tags' contain multiple tags, quoted and separated by spaces,
# we want to get rid of the quotes in order to have a proper list
set tags [string map { \" "" } $tags]
# we want to get rid of the quotes in order to have a proper list.
# Flatten it so {"a b"} and [list "a b"] both yield two tags.
set tags [concat {*}[string map { \" "" } $tags]]
check_subtags $tags
set ::tags [concat $::tags $tags]
if {![tags_acceptable $::tags err]} {
Expand Down Expand Up @@ -522,8 +523,9 @@ proc start_server {options {code undefined}} {
}
"tags" {
# If we 'tags' contain multiple tags, quoted and separated by spaces,
# we want to get rid of the quotes in order to have a proper list
set tags [string map { \" "" } $value]
# we want to get rid of the quotes in order to have a proper list.
# Flatten it so {"a b"} and [list "a b"] both yield two tags.
set tags [concat {*}[string map { \" "" } $value]]
check_subtags $tags
set ::tags [concat $::tags $tags]
}
Expand Down
2 changes: 2 additions & 0 deletions tests/support/test.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ proc test {name code {okpattern undefined} {tags {}}} {
}

set old_singledb $::singledb
# Flatten so {"a b"} and [list "a b"] both yield two tags, as in start_server.
set tags [concat {*}[string map { \" "" } $tags]]
check_subtags $tags
set tags [concat $::tags $tags]
if {![tags_acceptable $tags err]} {
Expand Down
Loading