Commit dbe0f1d3 authored by Aleksandar Bakic's avatar Aleksandar Bakic

Extended tests of indent-line and added one test of delete-indentation.

parent 61f9ef63
......@@ -858,28 +858,34 @@ climacs ")
(let ((buffer (make-instance 'binseq-buffer)))
(insert-buffer-sequence buffer 0 " climacs ")
(let ((m (make-instance 'persistent-left-sticky-mark
:buffer buffer :offset 0)))
:buffer buffer :offset 3)))
(indent-line m 4 nil)
(buffer-sequence buffer 0 (size buffer))))
" climacs ")
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
0 " climacs ")
(deftest binseq-buffer-indent-line.test-2
(let ((buffer (make-instance 'binseq-buffer)))
(insert-buffer-sequence buffer 0 " climacs ")
(let ((m (make-instance 'persistent-left-sticky-mark
:buffer buffer :offset 0)))
:buffer buffer :offset 4)))
(indent-line m 5 4)
(buffer-sequence buffer 0 (size buffer))))
" climacs ")
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
3 " climacs ")
(deftest binseq-buffer-indent-line.test-3
(let ((buffer (make-instance 'binseq-buffer)))
(insert-buffer-sequence buffer 0 " climacs ")
(let ((m (make-instance 'persistent-right-sticky-mark
:buffer buffer :offset 0)))
:buffer buffer :offset 3)))
(indent-line m 5 4)
(buffer-sequence buffer 0 (size buffer))))
" climacs ")
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
2 " climacs ")
;;; obinseq tests
......@@ -1719,25 +1725,31 @@ climacs ")
(let ((buffer (make-instance 'obinseq-buffer)))
(insert-buffer-sequence buffer 0 " climacs ")
(let ((m (make-instance 'persistent-left-sticky-mark
:buffer buffer :offset 0)))
:buffer buffer :offset 3)))
(indent-line m 4 nil)
(buffer-sequence buffer 0 (size buffer))))
" climacs ")
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
0 " climacs ")
(deftest obinseq-buffer-indent-line.test-2
(let ((buffer (make-instance 'obinseq-buffer)))
(insert-buffer-sequence buffer 0 " climacs ")
(let ((m (make-instance 'persistent-left-sticky-mark
:buffer buffer :offset 0)))
:buffer buffer :offset 4)))
(indent-line m 5 4)
(buffer-sequence buffer 0 (size buffer))))
" climacs ")
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
3 " climacs ")
(deftest obinseq-buffer-indent-line.test-3
(let ((buffer (make-instance 'obinseq-buffer)))
(insert-buffer-sequence buffer 0 " climacs ")
(let ((m (make-instance 'persistent-right-sticky-mark
:buffer buffer :offset 0)))
:buffer buffer :offset 3)))
(indent-line m 5 4)
(buffer-sequence buffer 0 (size buffer))))
" climacs ")
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
2 " climacs ")
......@@ -861,25 +861,44 @@ climacs ")
(let ((buffer (make-instance 'standard-buffer)))
(insert-buffer-sequence buffer 0 " climacs ")
(let ((m (make-instance 'standard-left-sticky-mark
:buffer buffer :offset 0)))
:buffer buffer :offset 3)))
(indent-line m 4 nil)
(buffer-sequence buffer 0 (size buffer))))
" climacs ")
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
0 " climacs ")
(deftest standard-buffer-indent-line.test-2
(let ((buffer (make-instance 'standard-buffer)))
(insert-buffer-sequence buffer 0 " climacs ")
(let ((m (make-instance 'standard-left-sticky-mark
:buffer buffer :offset 0)))
:buffer buffer :offset 4)))
(indent-line m 5 4)
(buffer-sequence buffer 0 (size buffer))))
" climacs ")
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
3 " climacs ")
(deftest standard-buffer-indent-line.test-3
(let ((buffer (make-instance 'standard-buffer)))
(insert-buffer-sequence buffer 0 " climacs ")
(let ((m (make-instance 'standard-right-sticky-mark
:buffer buffer :offset 0)))
:buffer buffer :offset 3)))
(indent-line m 5 4)
(buffer-sequence buffer 0 (size buffer))))
" climacs ")
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
2 " climacs ")
(deftest standard-buffer-delete-indentation.test-1
(let ((buffer (make-instance 'standard-buffer)))
(insert-buffer-sequence buffer 0 "
climacs ")
(let ((m (make-instance 'standard-left-sticky-mark
:buffer buffer :offset 3)))
(delete-indentation m)
(values
(offset m)
(buffer-sequence buffer 0 (size buffer)))))
1 "
climacs ")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment