-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
host-appointer: prohibit invalid host names
- Loading branch information
1 parent
7e472e2
commit 89241a0
Showing
7 changed files
with
107 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. | ||
# Copyright (C) 2008-2018 NIWA & British Crown (Met Office) & Contributors. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
#------------------------------------------------------------------------------- | ||
# Test parsing of string list items | ||
. $(dirname $0)/test_header | ||
|
||
#------------------------------------------------------------------------------- | ||
set_test_number 2 | ||
|
||
install_test $TEST_NAME_BASE | ||
#------------------------------------------------------------------------------- | ||
#synonyms.py spaceless_string_list >&2 | ||
run_ok "${TEST_NAME_BASE}-good" synonyms.py spaceless_string_list | ||
run_ok "${TEST_NAME_BASE}-bad" python -m doctest \ | ||
"${CYLC_DIR}/lib/parsec/validate.py" |
29 changes: 29 additions & 0 deletions
29
lib/parsec/tests/synonyms/07-string_list/spaceless_string_list.rc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# All legals ways of defining string lists should parse to the same result. | ||
# triple-quoted string values are currently illegal. | ||
[spaceless_string_list] | ||
[[the_quick_brown_fox]] | ||
item 1 = the, quick, brown, fox # comment | ||
item 2 = the, quick , brown, fox, # comment | ||
item 3 = 'the', 'quick' , 'brown', 'fox', # comment | ||
item 4 = "the", "quick" , "brown", "fox", # comment | ||
item 5 = "the", "quick" , "brown",\ | ||
"fox", # comment | ||
item 6 = the, quick, brown, fox # jumps, over # the lazy | ||
|
||
[[the#c1_quick#c2_brown#c3_fox#c4]] | ||
# internal comments should be preserved | ||
item 1 = 'the#c1', 'quick#c2' , 'brown#c3', 'fox#c4', # comment | ||
item 2 = "the#c1", "quick#c2" , "brown#c3", "fox#c4", # comment | ||
item 3 = "the#c1", "quick#c2" , "brown#c3",\ | ||
"fox#c4", # comment | ||
|
||
[[theCOMMAc1_quickCOMMAc2_brownCOMMAc3_foxCOMMAc4]] | ||
# internal commas should be preserved | ||
item 1 = 'the,c1', 'quick,c2' , 'brown,c3', 'fox,c4', # comment | ||
item 2 = "the,c1", "quick,c2" , "brown,c3", "fox,c4", # comment | ||
item 3 = "the,c1", "quick,c2" , "brown,c3",\ | ||
"fox,c4", # comment | ||
|
||
[[NULL]] | ||
item 1 = | ||
item 2 = # comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters