gri3-wm/testcases/t
Michael Stapelberg a532f5ac39 Implement a new parser for commands. (+test)
On the rationale of using a custom parser instead of a lex/yacc one, see this
quote from src/commands_parser.c:
     We use a hand-written parser instead of lex/yacc because our commands are
     easy for humans, not for computers. Thus, it’s quite hard to specify a
     context-free grammar for the commands. A PEG grammar would be easier, but
     there’s downsides to every PEG parser generator I have come accross so far.

     This parser is basically a state machine which looks for literals or strings
     and can push either on a stack. After identifying a literal or string, it
     will either transition to the current state, to a different state, or call a
     function (like cmd_move()).

     Special care has been taken that error messages are useful and the code is
     well testable (when compiled with -DTEST_PARSER it will output to stdout
     instead of actually calling any function).

During the migration phase (I plan to completely switch to this parser before
4.2 will be released), the new parser will parse every command you send to
i3 and save the resulting call stack. Then, the old parser will parse your
input and actually execute the commands. Afterwards, both call stacks will be
compared and any differences will be logged.

The new parser works with 100% of the test suite and produces identical call
stacks.
2012-01-14 21:29:57 +00:00
..
000-load-deps.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
001-tile.t testcases: use open_window everywhere 2011-11-23 20:33:44 +00:00
002-i3-sync.t testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
003-ipc.t testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
004-unmanaged.t testcases: use open_window everywhere 2011-11-23 20:33:44 +00:00
005-floating.t testcases: use open_window everywhere 2011-11-23 20:33:44 +00:00
100-fullscreen.t Merge branch 'master' into next 2011-12-17 15:28:51 +00:00
101-focus.t testcases: don't sync_with_i3() before $x->input_focus 2011-11-23 00:02:54 +00:00
102-dock.t testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
103-move.t testcases: correctly enable lexical pragmata 2011-11-21 23:50:39 +00:00
104-focus-stack.t testcases: drop open_floating_window()s $x parameter, use global 2011-11-23 00:02:47 +00:00
105-stacking.t testcases: correctly enable lexical pragmata 2011-11-21 23:50:39 +00:00
111-goto.t Merge branch 'master' into next 2011-12-17 14:22:57 +00:00
112-floating-resize.t Merge branch 'master' into next 2011-12-17 17:16:39 +00:00
113-urgent.t testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
114-client-leader.t testcases: drop open_floating_window()s $x parameter, use global 2011-11-23 00:02:47 +00:00
115-ipc-workspaces.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
116-nestedcons.t properly serialize floating/scratchpad state when restarting 2012-01-05 21:41:20 +00:00
117-workspace.t testcases: use $x in wait_for_(un)map change to wait_for_(un)map($win) 2011-11-21 23:50:58 +00:00
118-openkill.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
119-match.t testcases: use open_window everywhere 2011-11-23 20:33:44 +00:00
120-multiple-cmds.t fix t/120-multiple-cmds: open a window before moving 2011-10-27 23:30:29 +01:00
121-next-prev.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
122-split.t testcases: use open_window everywhere 2011-11-23 20:33:44 +00:00
124-move.t Refactor the code out of src/cmdparse.y to src/commands.c 2012-01-14 16:59:52 +00:00
126-regress-close.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
127-regress-floating-parent.t testcases: replace sleep with sync_with_i3 where appropiate 2011-11-23 20:33:44 +00:00
128-open-order.t testcases: correctly enable lexical pragmata 2011-11-21 23:50:39 +00:00
129-focus-after-close.t testcases: replace sleep with sync_with_i3 where appropiate 2011-11-23 20:33:44 +00:00
130-close-empty-split.t testcases: correctly enable lexical pragmata 2011-11-21 23:50:39 +00:00
131-stacking-order.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
132-move-workspace.t Introduce synonyms: 'move to workspace' and 'move container to workspace' and 'move window to workspace' 2012-01-10 22:16:09 +00:00
133-size-hints.t testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
134-invalid-command.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
135-floating-focus.t testcases: don't sync_with_i3() before $x->input_focus 2011-11-23 00:02:54 +00:00
136-floating-ws-empty.t Merge branch 'master' into next 2011-12-20 18:44:26 +00:00
137-floating-unmap.t testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
138-floating-attach.t testcases: drop open_floating_window()s $x parameter, use global 2011-11-23 00:02:47 +00:00
139-ws-numbers.t testcases: use Test::More is_deeply, don't depend on Test::Deep 2011-11-23 00:02:57 +00:00
140-focus-lost.t testcases: use Test::More is_deeply, don't depend on Test::Deep 2011-11-23 00:02:57 +00:00
141-resize.t Merge branch 'master' into next 2011-11-29 22:37:11 +00:00
142-regress-move-floating.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
143-regress-floating-restart.t tests: make t/143 actually verify floating windows are restored properly 2012-01-05 21:20:53 +00:00
144-regress-floating-resize.t testcases: t/144-*: use open_window instead of launching urxvt 2011-11-23 20:33:44 +00:00
145-flattening.t testcases: drop open_window()s $x parameter, use global one instead 2011-11-21 23:51:04 +00:00
146-floating-reinsert.t testcases: drop open_floating_window()s $x parameter, use global 2011-11-23 00:02:47 +00:00
147-regress-floatingmove.t testcases: replace sleep with sync_with_i3 where appropiate 2011-11-23 20:33:44 +00:00
148-regress-floatingmovews.t testcases: replace sleep with sync_with_i3 where appropiate 2011-11-23 20:33:44 +00:00
150-regress-dock-restart.t testcases: drop open_window()s $x parameter, use global one instead 2011-11-21 23:51:04 +00:00
151-regress-float-size.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
152-regress-level-up.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
153-floating-originalsize.t testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
154-regress-multiple-dock.t testcases: drop open_window()s $x parameter, use global one instead 2011-11-21 23:51:04 +00:00
155-floating-split-size.t testcases: drop open_window()s $x parameter, use global one instead 2011-11-21 23:51:04 +00:00
156-fullscreen-focus.t Merge branch 'master' into next 2012-01-07 18:21:12 +00:00
157-regress-fullscreen-level-up.t testcases: drop open_window()s $x parameter, use global one instead 2011-11-21 23:51:04 +00:00
158-wm_take_focus.t testcases: drop open_window()s $x parameter, use global one instead 2011-11-21 23:51:04 +00:00
159-socketpaths.t Merge branch 'master' into next 2011-12-18 18:02:08 +00:00
161-regress-borders-restart.t testcases: drop open_window()s $x parameter, use global one instead 2011-11-21 23:51:04 +00:00
162-regress-dock-urgent.t testcases: use open_window everywhere 2011-11-23 20:33:44 +00:00
163-wm-state.t testcases: don't sync_with_i3() before $x->input_focus 2011-11-23 00:02:54 +00:00
164-kill-win-vs-client.t testcases: don't sync_with_i3() before $x->input_focus 2011-11-23 00:02:54 +00:00
165-for_window.t testcases: always start i3 through i3test::launch_with_config 2011-12-04 14:14:20 +01:00
166-assign.t testcases: always start i3 through i3test::launch_with_config 2011-12-04 14:14:20 +01:00
167-workspace_layout.t testcases: always start i3 through i3test::launch_with_config 2011-12-04 14:14:20 +01:00
168-regress-fullscreen-restart.t testcases: replace sleep with sync_with_i3 where appropiate 2011-11-23 20:33:44 +00:00
169-border-toggle.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
170-force_focus_wrapping.t testcases: always start i3 through i3test::launch_with_config 2011-12-04 14:14:20 +01:00
171-config-migrate.t Introduce synonyms: 'move to workspace' and 'move container to workspace' and 'move window to workspace' 2012-01-10 22:16:09 +00:00
172-start-on-named-ws.t testcases: always start i3 through i3test::launch_with_config 2011-12-04 14:14:20 +01:00
173-get-marks.t Merge branch 'master' into next 2011-12-17 14:22:57 +00:00
173-regress-focus-assign.t testcases: always start i3 through i3test::launch_with_config 2011-12-04 14:14:20 +01:00
174-border-config.t testcases: always start i3 through i3test::launch_with_config 2011-12-04 14:14:20 +01:00
174-regress-focus-toggle.t tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC) 2011-10-08 14:38:50 +01:00
175-startup-notification.t testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
176-workspace-baf.t testcases: always start i3 through i3test::launch_with_config 2011-12-04 14:14:20 +01:00
177-bar-config.t testcases: always start i3 through i3test::launch_with_config 2011-12-04 14:14:20 +01:00
178-regress-workspace-open.t Close empty workspaces if they're not visible. 2011-10-24 00:12:14 +01:00
179-regress-multiple-ws.t Bugfix: Correctly return to initial state after prev/next/back_and_forth (Thanks Brian) 2011-11-10 18:42:24 +00:00
180-fd-leaks.t tests: add t/180-fd-leaks to ensure i3 does not leak fds on exec 2011-11-20 10:52:21 +00:00
181-regress-float-border.t tests: add test for ticket #561 (floating window size when changing border) 2011-11-26 21:20:00 +00:00
182-regress-focus-dock.t Bugfix: Fix crash on '[class="i3bar"] focus' (+test) (Thanks f8l) 2011-11-26 22:17:34 +00:00
183-config-variables.t tests: add test for previous commit 2011-12-17 11:18:43 +00:00
184-regress-float-split-resize.t Bugfix: Fix floating resize for floating split containers (+test) 2011-12-18 15:18:20 +00:00
185-scratchpad.t Bugfix: Correctly handle 'move scratchpad' on workspace level (+test) (Thanks mseed) 2012-01-07 17:36:30 +00:00
186-regress-assign-focus-parent.t Bugfix: Open new windows in the correct place when assignments match (+test) (Thanks Don) 2012-01-07 18:50:00 +00:00
187-commands-parser.t Implement a new parser for commands. (+test) 2012-01-14 21:29:57 +00:00
500-multi-monitor.t tests: Implement multi-monitor tests using Xdmx 2011-12-26 20:48:57 +01:00
501-scratchpad.t Bugfix: Show scratchpad on the correct output (+test) 2012-01-07 16:53:37 +00:00
502-focus-output.t add testcase for 'focus output' 2012-01-08 11:59:24 +00:00
503-workspace.t tests: use open_window to avoid motion notifies which in turn trigger endless loops 2012-01-10 22:16:09 +00:00
504-move-workspace-to-output.t Implement 'move workspace to output <output>' 2012-01-10 22:16:50 +00:00