Convert manual indent test for ps-mode into unit test

* test/manual/indent/ps-mode.ps: Delete file.
* test/lisp/progmodes/ps-mode-tests.el (ps-mode-test-indent):
New unit test based on deleted file.
This commit is contained in:
Stefan Kangas 2020-09-21 17:19:48 +02:00
parent fb8c319825
commit 01f7fdb2a0
2 changed files with 24 additions and 14 deletions

View file

@ -43,6 +43,30 @@
(should (equal (buffer-string)
"foo\\220\\221\\222bar"))))
(ert-deftest ps-mode-test-indent ()
;; Converted from manual test.
(with-temp-buffer
(ps-mode)
;; TODO: Should some of these be fontification tests as well?
(let ((orig "%!PS-2.0
<< 23 45 >> %dictionary
< 23 > %hex string
<~a>a%a~> %base85 string
(%)s
(sf\(g>a)sdg)
/foo {
<<
hello 2
3
>>
} def
"))
(insert orig)
(indent-region (point-min) (point-max))
(should (equal (buffer-string) orig)))))
(provide 'ps-mode-tests)
;;; ps-mode-tests.el ends here

View file

@ -1,14 +0,0 @@
%!PS-2.0
<< 23 45 >> %dictionary
< 23 > %hex string
<~a>a%a~> %base85 string
(%)s
(sf\(g>a)sdg)
/foo {
<<
hello 2
3
>>
} def