From 8bc771ac16362f05d98bf8b29877939d6edb3c91 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 25 Jan 2013 13:55:26 +0100 Subject: [PATCH] Bugfix: parse outputs as "word", not "string", to ignore trailing whitespace (Thanks leifarne) fixes #921 --- parser-specs/config.spec | 2 +- testcases/t/201-config-parser.t | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) 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 ################################################################################