aboutsummaryrefslogtreecommitdiffstats
path: root/src/test.el
diff options
context:
space:
mode:
authorDave Mayo <dave_mayo@harvard.edu>2014-08-28 08:03:03 -0400
committerDave Mayo <dave_mayo@harvard.edu>2014-08-28 08:03:03 -0400
commite0e0a29bcf13f29c004de6c54ea2879738cc2ecb (patch)
treed86a0a007f1cea0c3571e4fa86f272aa21ed05b3 /src/test.el
parentdd4aecb453b2f9ad494c9e0ca397528db2bbf2ac (diff)
downloademmet-mode-e0e0a29bcf13f29c004de6c54ea2879738cc2ecb.tar.lz
emmet-mode-e0e0a29bcf13f29c004de6c54ea2879738cc2ecb.tar.xz
emmet-mode-e0e0a29bcf13f29c004de6c54ea2879738cc2ecb.zip
Wrap using token replacement, handles multiline. Test for multiline.
Diffstat (limited to 'src/test.el')
-rw-r--r--src/test.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test.el b/src/test.el
index 48bb5ed..28b7db4 100644
--- a/src/test.el
+++ b/src/test.el
@@ -624,6 +624,7 @@
(defun emmet-wrap-with-markup-test (lis)
(let ((es (car lis))
+ (ins (or (elt lis 1) "This is gnarly text with $$$s and <span>markup</span> and end brackets}}s"))
(indent-tabs-mode nil)
(tab-width 2)
(standard-indent 2))
@@ -631,7 +632,7 @@
(emmet-mode 1)
(sgml-mode)
(set-mark (point))
- (insert "This is gnarly text with $$$s and <span>markup</span> and end brackets}}s")
+ (insert ins)
(emmet-wrap-with-markup es)
(buffer-string))))
@@ -643,5 +644,9 @@
#'emmet-wrap-with-markup-test
'((("div>ul>li*3") . "<div>\n <ul>\n <li>This is gnarly text with $$$s and <span>markup</span> and end brackets}}s</li>\n <li>This is gnarly text with $$$s and <span>markup</span> and end brackets}}s</li>\n <li>This is gnarly text with $$$s and <span>markup</span> and end brackets}}s</li>\n </ul>\n</div>")))
+(emmet-run-test-case "Wrap with multiline content"
+ #'emmet-wrap-with-markup-test
+ '((("div>ul>li" "I am some\nmultiline\n text") . "<div>\n <ul>\n <li>I am some\n multiline\n text</li>\n </ul>\n</div>")))
+
;; start
(emmet-test-cases)