migrate-config: also handle named workspaces correctly when their names come after the bindings (Thanks xpt)

This commit is contained in:
Michael Stapelberg
2011-07-06 17:56:09 +02:00
parent 95ee21dc3b
commit 03aa95813e
2 changed files with 25 additions and 2 deletions

View File

@ -297,6 +297,15 @@ $output = migrate_config($input);
ok(!line_exists($output, qr|^workspace|), 'workspace name not present');
ok(line_exists($output, qr|^bindsym Mod1\+3 workspace work|), 'named workspace in bindings');
# The same, but in reverse order
$input = <<EOT;
bindsym Mod1+3 3
workspace 3 work
EOT
$output = migrate_config($input);
ok(!line_exists($output, qr|^workspace|), 'workspace name not present');
ok(line_exists($output, qr|^bindsym Mod1\+3 workspace work|), 'named workspace in bindings');
$output = migrate_config('bindsym Mod1+3 3');
ok(line_exists($output, qr|^bindsym Mod1\+3 workspace 3|), 'workspace changed');