Permalink
Browse files

Failing test for three monitors

  • Loading branch information...
1 parent 72e91c1 commit e1d1c5f0132a7ed078864fd8f20281247827abf1 @codeape2 committed Oct 29, 2010
Showing with 52 additions and 20 deletions.
  1. +2 −20 tests/run
  2. +26 −0 tests/test_three_monitors
  3. +24 −0 tests/test_two_monitors
View
22 tests/run
@@ -1,22 +1,4 @@
#! /usr/bin/env bash
-. testlib
-
-# setup
-trap kill_jobs EXIT
-ensure_no_vimservers
-start_vim_servers LEFT RIGHT
-sleep 1
-
-# given
-open_vim LEFT myfile.txt
-open_vim_tab LEFT myotherfile.txt
-open_vim RIGHT myfile.txt
-
-# then
-[[ `current_file_name RIGHT` == "" ]] || fail $LINENO
-buffer_is_loaded RIGHT myfile.txt && fail $LINENO
-
-[[ `current_file_name LEFT` == "myfile.txt" ]] || fail $LINENO
-buffer_is_loaded LEFT myfile.txt || fail $LINENO
-
+./test_two_monitors
+./test_three_monitors
View
26 tests/test_three_monitors
@@ -0,0 +1,26 @@
+#! /usr/bin/env bash
+
+. testlib
+
+# setup
+trap kill_jobs EXIT
+ensure_no_vimservers
+start_vim_servers LEFT RIGHT MIDDLE
+sleep 1
+
+# given
+open_vim LEFT myfile.txt
+open_vim_tab LEFT filefour.txt
+open_vim RIGHT myotherfile.txt
+open_vim MIDDLE thirdfile.txt
+
+[[ `current_file_name LEFT` == "filefour.txt" ]] || fail $LINENO
+
+# when
+open_vim MIDDLE myfile.txt
+
+# then
+[[ `current_file_name MIDDLE` == "thirdfile.txt" ]] || fail $LINENO
+[[ `current_file_name LEFT` == "myfile.txt" ]] || fail $LINENO
+
+wait_for_input
View
24 tests/test_two_monitors
@@ -0,0 +1,24 @@
+#! /usr/bin/env bash
+
+. testlib
+
+# setup
+trap kill_jobs EXIT
+ensure_no_vimservers
+start_vim_servers LEFT RIGHT
+sleep 1
+
+# given
+open_vim LEFT myfile.txt
+open_vim_tab LEFT myotherfile.txt
+
+# when
+open_vim RIGHT myfile.txt
+
+# then
+[[ `current_file_name RIGHT` == "" ]] || fail $LINENO
+buffer_is_loaded RIGHT myfile.txt && fail $LINENO
+
+[[ `current_file_name LEFT` == "myfile.txt" ]] || fail $LINENO
+buffer_is_loaded LEFT myfile.txt || fail $LINENO
+

0 comments on commit e1d1c5f

Please sign in to comment.