nterm add unit testing for ED and EL

 

File modified: lisp/nterm/nterm-ut.el

Change347 at Sat Aug 21 19:45:45 2010 +0200 by Ivan Kanis <ivan@tao>

diff -r 14cda99ec7a7 -r 76222e55c9b1 lisp/nterm/nterm-ut.el
--- a/lisp/nterm/nterm-ut.el	Sat Aug 21 19:45:00 2010 +0200
+++ b/lisp/nterm/nterm-ut.el	Sat Aug 21 19:45:45 2010 +0200
@@ -517,12 +517,51 @@
 " ten characters of each flavour, and a rectangle

of 5 x 4 "
 "A's filling the top left of the screen.

Push <RETURN>"))))
 
-(ert-deftest nterm-clear-double-width ()
-  "Write a double underlined line an then clear it.
-There should be a blank screen with no attribute."
+(ert-deftest nterm-vt100-ed-1 ()
+  "Test VT100 ED partial delete."
   (should (nterm-ut
-           "16cc13d28218738d5d8688f7a4e0e4e5" "971a0e38dce04387a30cf29bfddfac4a"
-           "#6d")))
+"200e3d98bfff785a3ae3c34b3e51bf8e" "3a6c01ada23aca922212b949e7beee53"
+  (concat
+"#8"
+"1"
+"1"))))
+
+(ert-deftest nterm-vt100-ed-2 ()
+  "Test VT100 ED complete delete.
+Make sure the double width line gets resetted."
+  (nterm-ut
+"16cc13d28218738d5d8688f7a4e0e4e5" "971a0e38dce04387a30cf29bfddfac4a"
+"#8#6"))
+
+(ert-deftest nterm-vt100-ed-3 ()
+  "Test VT100 ED partial delete on double width line"
+  (nterm-ut
+"9f535039ec87637af83c5812ce282af5" "3e4391164b1188c2ac007e49bf90d01d"
+ (concat
+"#8#6"
+"#61"
+"1#6")))
+
+(ert-deftest nterm-vt100-el ()
+  "Test VT100 EL.
+Double line attribute should not be cleared. Test partial erase
+with argument 0 and 1."
+  (should (nterm-ut
+"3cc5918951990ccfc54e74a837310b2a" "dda2b65811ffb887c48153cec7a2282c"
+ (concat
+"1234
"
+"1234
"
+"1234
"
+"1234
"
+"#61234
"
+"#61234
"
+"#61234
"))))
+
+;; blink dwl breakage
+;; 
+;; 
+;; 
+;; #3T
 
 ;; Copyright (C) 2010 Ivan Kanis
 ;; Author: Ivan Kanis


back