From: Michael Stapelberg Date: Fri, 25 Jan 2013 12:55:26 +0000 (+0100) Subject: Bugfix: parse outputs as "word", not "string", to ignore trailing whitespace (Thanks... X-Git-Tag: 4.5~46^2^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8bc771ac16362f05d98bf8b29877939d6edb3c91;p=i3%2Fi3 Bugfix: parse outputs as "word", not "string", to ignore trailing whitespace (Thanks leifarne) fixes #921 --- diff --git a/parser-specs/config.spec b/parser-specs/config.spec index 7a31a5d8..168b6a9f 100644 --- a/parser-specs/config.spec +++ b/parser-specs/config.spec @@ -214,7 +214,7 @@ state WORKSPACE_OUTPUT: -> WORKSPACE_OUTPUT_STR state WORKSPACE_OUTPUT_STR: - output = string + output = word -> call cfg_workspace($workspace, $output) # ipc-socket diff --git a/testcases/t/201-config-parser.t b/testcases/t/201-config-parser.t index d6010795..266d2959 100644 --- a/testcases/t/201-config-parser.t +++ b/testcases/t/201-config-parser.t @@ -204,6 +204,24 @@ is(parser_calls($config), $expected, 'workspace_layout ok'); +################################################################################ +# workspace assignments, with trailing whitespace (ticket #921) +################################################################################ + +$config = <<'EOT'; +workspace "3" output DP-1 +workspace "3" output VGA-1 +EOT + +$expected = <<'EOT'; +cfg_workspace(3, DP-1) +cfg_workspace(3, VGA-1) +EOT + +is(parser_calls($config), + $expected, + 'workspace assignment ok'); + ################################################################################ # new_window ################################################################################