]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/201-config-parser.t
Add default_{,floating_}border to config
[i3/i3] / testcases / t / 201-config-parser.t
index ece7e9b9a35012e68cb0f41b98e1c4ee05c421d9..6857b6211c2645ad456afeaf1521e09e063664d9 100644 (file)
@@ -145,7 +145,7 @@ is(parser_calls($config),
 
 $config = <<'EOT';
 floating_minimum_size 80x55
-floating_minimum_size 80    x  55  
+floating_minimum_size 80    x  55
 floating_maximum_size 73 x 10
 EOT
 
@@ -245,8 +245,8 @@ is(parser_calls($config),
 ################################################################################
 
 $config = <<'EOT';
-workspace "3" output DP-1 
-workspace "3" output           VGA-1   
+workspace "3" output DP-1
+workspace "3" output           VGA-1
 EOT
 
 $expected = <<'EOT';
@@ -266,19 +266,33 @@ $config = <<'EOT';
 new_window 1pixel
 new_window normal
 new_window none
+default_border 1pixel
+default_border normal
+default_border none
 new_float 1pixel
 new_float normal
 new_float none
+default_floating_border 1pixel
+default_floating_border normal
+default_floating_border none
 EOT
 
 $expected = <<'EOT';
-cfg_new_window(new_window, 1pixel, -1)
-cfg_new_window(new_window, normal, 2)
-cfg_new_window(new_window, none, -1)
-cfg_new_window(new_float, 1pixel, -1)
-cfg_new_window(new_float, normal, 2)
-cfg_new_window(new_float, none, -1)
-EOT
+cfg_default_border(new_window, 1pixel, -1)
+cfg_default_border(new_window, normal, 2)
+cfg_default_border(new_window, none, -1)
+cfg_default_border(default_border, 1pixel, -1)
+cfg_default_border(default_border, normal, 2)
+cfg_default_border(default_border, none, -1)
+cfg_default_border(new_float, 1pixel, -1)
+cfg_default_border(new_float, normal, 2)
+cfg_default_border(new_float, none, -1)
+cfg_default_border(default_floating_border, 1pixel, -1)
+cfg_default_border(default_floating_border, normal, 2)
+cfg_default_border(default_floating_border, none, -1)
+EOT
+
+# TODO: are there no tests for "border pixel 1" etc?
 
 is(parser_calls($config),
    $expected,
@@ -462,7 +476,9 @@ my $expected_all_tokens = "ERROR: CONFIG: Expected one of these tokens: <end>, '
         floating_modifier
         default_orientation
         workspace_layout
+        default_border
         new_window
+        default_floating_border
         new_float
         hide_edge_borders
         for_window