diff options
-rw-r--r-- | libbbot/build-config.cxx | 3 | ||||
-rw-r--r-- | libbbot/manifest.cxx | 25 | ||||
-rw-r--r-- | libbbot/manifest.hxx | 7 | ||||
-rw-r--r-- | tests/buildtab/testscript | 8 | ||||
-rw-r--r-- | tests/manifest/task.test | 27 |
5 files changed, 1 insertions, 69 deletions
diff --git a/libbbot/build-config.cxx b/libbbot/build-config.cxx index 9005eca..05d123e 100644 --- a/libbbot/build-config.cxx +++ b/libbbot/build-config.cxx @@ -93,10 +93,7 @@ namespace bbot config.warning_regexes.emplace_back (move (re)); } else // Configuration variable. - { - task_manifest::check_config (v); config.vars.emplace_back (move (v)); - } } } catch (const invalid_argument& e) diff --git a/libbbot/manifest.cxx b/libbbot/manifest.cxx index a1cb325..db33021 100644 --- a/libbbot/manifest.cxx +++ b/libbbot/manifest.cxx @@ -536,7 +536,7 @@ namespace bbot if (!config.empty ()) bad_name ("task configuration redefinition"); - config = parse_tab (v, check_config, "configuration"); + config = parse_tab (v, [](const string&){}, "configuration"); if (config.empty ()) bad_value ("empty task configuration"); @@ -629,29 +629,6 @@ namespace bbot } void task_manifest:: - check_config (const string& s) - { - auto i (s.begin ()); - auto e (s.end ()); - - // Iterate until the variable name end and check that it contains no - // whitespaces. - // - for (; i != e; ++i) - { - char c (*i); - - if (c == ' ' || c == '\t') // Whitespace in name. - throw invalid_argument ("expected variable assignment"); - else if (c == '=') - break; - } - - if (i == e) - throw invalid_argument ("no variable value"); - } - - void task_manifest:: check_regex (const string& s) { try diff --git a/libbbot/manifest.hxx b/libbbot/manifest.hxx index 75a6995..117abb6 100644 --- a/libbbot/manifest.hxx +++ b/libbbot/manifest.hxx @@ -166,13 +166,6 @@ namespace bbot void serialize (butl::manifest_serializer&) const; - // Check that a string has the name=value format. The name must not - // contain spaces. Throw invalid_argument if the string doesn't conform to - // these rules. - // - static void - check_config (const std::string&); - // Check that a string is a valid (ECMAScript) regular expression. Throw // invalid_argument if that's not the case. // diff --git a/tests/buildtab/testscript b/tests/buildtab/testscript index 8180d85..dee069a 100644 --- a/tests/buildtab/testscript +++ b/tests/buildtab/testscript @@ -62,14 +62,6 @@ EOI cin:1:87: error: unterminated quoted string EOE - - : no-value - : - $* <<EOI 2>>EOE == 1 - windows*-vc_14* windows-vc_14-32 i686-microsoft-win32-msvc14.0 config.cc.coptions - EOI - cin:1:64: error: no variable value - EOE } : dup-config-name diff --git a/tests/manifest/task.test b/tests/manifest/task.test index c2783cf..4013f52 100644 --- a/tests/manifest/task.test +++ b/tests/manifest/task.test @@ -196,24 +196,6 @@ test.options += -t config: 'abc=x EOI - : bad-var - : - { - : no-value - : - $* <<EOI 2>'stdin:2:9: error: invalid task configuration: no variable value' == 1 - : 1 - config: abc xyz=1 - EOI - - : no-assignment - : - $* <<EOI 2>'stdin:2:9: error: invalid task configuration: expected variable assignment' == 1 - : 1 - config: 'abc xyz'=1 - EOI - } - : multiline : { @@ -225,15 +207,6 @@ test.options += -t 'abc=x \ EOI - - : bad-var - : - $* <<EOI 2>'stdin:3:1: error: invalid task configuration: no variable value' == 1 - : 1 - config: \ - abc xyz=1 - \ - EOI } } |