Autocommit of file /home/julien/.dotfiles/vim/.vim/bundle/vimtodo/test/test007.vim...
authorJulien Valroff <julien@kirya.net>
Tue, 1 Nov 2011 08:08:07 +0000 (09:08 +0100)
committerJulien Valroff <julien@kirya.net>
Tue, 1 Nov 2011 08:08:07 +0000 (09:08 +0100)
.vim/bundle/vimtodo/test/test007.vim [new file with mode: 0644]

diff --git a/.vim/bundle/vimtodo/test/test007.vim b/.vim/bundle/vimtodo/test/test007.vim
new file mode 100644 (file)
index 0000000..54425fa
--- /dev/null
@@ -0,0 +1,46 @@
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Test task time totals
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+source setup_tests.inc
+call vimtap#Plan(7)
+
+" Basic test
+normal icn TODO test entry
+normal o    Some Subtask [0.5h]
+normal o    Some other subtask [1.5h]
+
+normal \ce
+call vimtap#Is(getline(2), "    :INFO:",
+    \ "INFO drawer created")
+call vimtap#Is(getline(3), "        +TOTALTIME: 2.00",
+    \ "TOTALTIME property added")
+
+normal ggdG
+
+" Try with two entries instead of 1
+normal icn TODO test entry [2.5h]
+normal o    Some subtask [1.5h]
+normal o    Some subtask [13.25h]
+normal ocn TODO another entry
+normal o    Subtask 1 [1.00h]
+normal o    Subtask 2 [4.75h]
+
+normal \ce
+call vimtap#Is(getline(2), "    :INFO:",
+    \ "First INFO drawer created (2 entries)")
+call vimtap#Is(getline(3), "        +TOTALTIME: 17.25",
+    \ "First total time correct (2 entries)")
+call vimtap#Is(getline(7), "    :INFO:",
+    \ "Second INFO drawer created (2 entries)")
+call vimtap#Is(getline(8), "        +TOTALTIME: 5.75",
+    \ "Second total time correct (2 entries)")
+
+" Change one time entry
+" Open all folds first
+normal zR
+normal 4Gc$Some subtask [1.75h]
+normal \ce
+call vimtap#Is(getline(3), "        +TOTALTIME: 17.50",
+    \ "Total time changed correctly")
+
+call vimtest#Quit()