[climacs-cvs] CVS update: climacs/Persistent/persistent-base-test.lisp

Aleksandar Bakic abakic at common-lisp.net
Mon Feb 7 22:13:42 UTC 2005


Update of /project/climacs/cvsroot/climacs/Persistent
In directory common-lisp.net:/tmp/cvs-serv30269/Persistent

Modified Files:
	persistent-base-test.lisp 
Log Message:
Fixes to delete-indentation, tests.

Date: Mon Feb  7 23:13:39 2005
Author: abakic

Index: climacs/Persistent/persistent-base-test.lisp
diff -u climacs/Persistent/persistent-base-test.lisp:1.7 climacs/Persistent/persistent-base-test.lisp:1.8
--- climacs/Persistent/persistent-base-test.lisp:1.7	Sun Feb  6 18:38:32 2005
+++ climacs/Persistent/persistent-base-test.lisp	Mon Feb  7 23:13:39 2005
@@ -887,6 +887,67 @@
        (buffer-sequence buffer 0 (size buffer)))))
   2 "	 climacs   ")
 
+(deftest binseq-buffer-delete-indentation.test-1
+  (let ((buffer (make-instance 'binseq-buffer)))
+    (insert-buffer-sequence buffer 0 "
+  	climacs   ")
+    (let ((m (make-instance 'persistent-left-sticky-mark
+			    :buffer buffer :offset 3)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  0 "climacs   ")
+
+(deftest binseq-buffer-delete-indentation.test-2
+  (let ((buffer (make-instance 'binseq-buffer)))
+    (insert-buffer-sequence buffer 0 "
+  	climacs   ")
+    (let ((m (make-instance 'persistent-right-sticky-mark
+			    :buffer buffer :offset 7)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  0 "climacs   ")
+
+(deftest binseq-buffer-delete-indentation.test-3
+  (let ((buffer (make-instance 'binseq-buffer)))
+    (insert-buffer-sequence buffer 0 "   climacs   ")
+    (let ((m (make-instance 'persistent-left-sticky-mark
+			    :buffer buffer :offset 7)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  0 "   climacs   ")
+
+(deftest binseq-buffer-delete-indentation.test-4
+  (let ((buffer (make-instance 'binseq-buffer)))
+    (insert-buffer-sequence buffer 0 "climacs
+   climacs   ")
+    (let ((m (make-instance 'persistent-right-sticky-mark
+			    :buffer buffer :offset 12)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  8 "climacs climacs   ")
+
+(deftest binseq-buffer-delete-indentation.test-5
+  (let ((buffer (make-instance 'binseq-buffer)))
+    (insert-buffer-sequence buffer 0 "
+
+   climacs   ")
+    (let ((m (make-instance 'persistent-right-sticky-mark
+			    :buffer buffer :offset 12)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  1 "
+climacs   ")
+
 ;;; obinseq tests
 
 (deftest obinseq-buffer-previous-line.test-1
@@ -1753,3 +1814,64 @@
        (offset m)
        (buffer-sequence buffer 0 (size buffer)))))
   2 "	 climacs   ")
+
+(deftest obinseq-buffer-delete-indentation.test-1
+  (let ((buffer (make-instance 'obinseq-buffer)))
+    (insert-buffer-sequence buffer 0 "
+  	climacs   ")
+    (let ((m (make-instance 'persistent-left-sticky-mark
+			    :buffer buffer :offset 3)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  0 "climacs   ")
+
+(deftest obinseq-buffer-delete-indentation.test-2
+  (let ((buffer (make-instance 'obinseq-buffer)))
+    (insert-buffer-sequence buffer 0 "
+  	climacs   ")
+    (let ((m (make-instance 'persistent-right-sticky-mark
+			    :buffer buffer :offset 7)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  0 "climacs   ")
+
+(deftest obinseq-buffer-delete-indentation.test-3
+  (let ((buffer (make-instance 'obinseq-buffer)))
+    (insert-buffer-sequence buffer 0 "   climacs   ")
+    (let ((m (make-instance 'persistent-left-sticky-mark
+			    :buffer buffer :offset 7)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  0 "   climacs   ")
+
+(deftest obinseq-buffer-delete-indentation.test-4
+  (let ((buffer (make-instance 'obinseq-buffer)))
+    (insert-buffer-sequence buffer 0 "climacs
+   climacs   ")
+    (let ((m (make-instance 'persistent-right-sticky-mark
+			    :buffer buffer :offset 12)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  8 "climacs climacs   ")
+
+(deftest obinseq-buffer-delete-indentation.test-5
+  (let ((buffer (make-instance 'obinseq-buffer)))
+    (insert-buffer-sequence buffer 0 "
+
+   climacs   ")
+    (let ((m (make-instance 'persistent-right-sticky-mark
+			    :buffer buffer :offset 12)))
+      (delete-indentation m)
+      (values
+       (offset m)
+       (buffer-sequence buffer 0 (size buffer)))))
+  1 "
+climacs   ")




More information about the Climacs-cvs mailing list