Changeset - 0142817cf293
[Not reviewed]
0 1 0
Sergey Pashinin - 11 years ago 2014-08-28 18:45:35
sergey@pashinin.com
Test renaming workgroup
1 file changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
tests/workgroups2-tests.el
Show inline comments
 
@@ -40,48 +40,55 @@
 
  (should (string= (wg-mode-line-string) " [First workgroup:--]"))
 
  (setq wg-flag-modified nil)
 
  (should (string= (wg-mode-line-string) " [First workgroup]"))
 
  (setq wg-flag-modified t)
 
  )
 

	
 
(ert-deftest 030-wg-utils ()
 
  (should (= (length (wg-all-buf-uids)) 1))
 
  (should (wg-frame-to-wconfig))
 
  )
 

	
 
(ert-deftest 040-wg-still-active ()
 
  (should workgroups-mode))
 

	
 
(ert-deftest 050-modify ()
 
  (split-window-vertically)
 
  (switch-to-buffer "*Messages*")
 
  ;; Check 2 buffers
 
  ;;(should-not (window-tree))
 
  ;;(should-not (wg-window-tree-to-wtree))
 
  ;;(should (= (length (wg-all-buf-uids)) 2))
 
  ;;(should-not (wg-current-workgroup))
 
  (unless (string-equal "initial_terminal" (terminal-name (selected-frame)))
 
    (should (wg-session-modified (wg-current-session))))
 

	
 
  ;; Rename
 
  (wg-rename-workgroup "asd")
 
  (should (string= (wg-mode-line-string) " [asd:**]"))
 
  (wg-rename-workgroup "First workgroup")
 
  (should (string= (wg-mode-line-string) " [First workgroup:**]"))
 

	
 
  )
 

	
 
(ert-deftest 055-structs ()
 
  (let* ((s (wg-current-session))
 
         (wgs (wg-session-workgroup-list s))
 
         (wg1 (car wgs))
 
         (bufs (wg-session-buf-list s)))
 
    (should s)
 
    ;;(should (wg-session-modified s))
 
    (should wgs)
 
    (should (string= "First workgroup" (wg-workgroup-name wg1)))
 
    (should bufs)
 
    )
 
  ;;(should-not (wg-current-wconfig))
 

	
 
  ;; wtree
 
  (let ((wtree (wg-window-tree-to-wtree)))
 
    (should wtree)
 
    (should-not (boundp 'window-tree))
 
    ;;(should (string= (wg-wtree-dir wtree) "a"))
 
    ;;(should-not (wg-wtree-wlist wtree))
 
    )
 
  )
 

	
0 comments (0 inline, 0 general)