summaryrefslogtreecommitdiff
path: root/test.el
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2013-07-09 19:24:04 +0000
committerTaylor R Campbell <campbell@mumble.net>2013-07-09 19:24:04 +0000
commit146a43469c968dad01b75aca479c4938d89ee8e4 (patch)
treedd197bf7dc78abf8bb60648525d26e897a17c8f2 /test.el
parent5114a626d0ee62d4afb10633df1dad934b793e13 (diff)
Add some slurp tests with characters and strings.
Diffstat (limited to 'test.el')
-rw-r--r--test.el36
1 files changed, 34 insertions, 2 deletions
diff --git a/test.el b/test.el
index c42f018..235fb81 100644
--- a/test.el
+++ b/test.el
@@ -1254,7 +1254,23 @@ Four arguments: the paredit command, the text of the buffer
("\"\"| \"\"" error)
("\"\" |\"\"" error)
;; ("\"\" \"|\"" error) ;++ Urk...
- ("\"\" \"\"|" error)))
+ ("\"\" \"\"|" error)
+ ("|(#\\x) y" error)
+ ("(|#\\x) y" "(|#\\x y)")
+ ("(#|\\x) y" "(#|\\x y)")
+ ("(#\\|x) y" "(#\\|x y)")
+ ("(#\\x|) y" "(#\\x| y)")
+ ("(#\\x)| y" error)
+ ("(#\\x) |y" error)
+ ("(#\\x) y|" error)
+ ("|(\"x\") y" error)
+ ("(|\"x\") y" "(|\"x\" y)")
+ ("(\"|x\") y" "(\"|x\" y)" "(\"|x y\")")
+ ("(\"x|\") y" "(\"x|\" y)" "(\"x| y\")")
+ ("(\"x\"|) y" "(\"x\"| y)")
+ ("(\"x\")| y" error)
+ ("(\"x\") |y" error)
+ ("(\"x\") y|" error)))
(paredit-test 'paredit-backward-slurp-sexp
'(("|" error)
@@ -1303,7 +1319,23 @@ Four arguments: the paredit command, the text of the buffer
("\"\"| \"\"" error)
("\"\" |\"\"" error)
("\"\" \"|\"" "\"\\\"\\\"|\"")
- ("\"\" \"\"|" error)))
+ ("\"\" \"\"|" error)
+ ("|x (#\\y)" error)
+ ("x| (#\\y)" error)
+ ("x |(#\\y)" error)
+ ("x (|#\\y)" "(x |#\\y)")
+ ("x (#|\\y)" "(x #|\\y)")
+ ("x (#\\|y)" "(x #\\|y)")
+ ("x (#\\y|)" "(x #\\y|)")
+ ("x (#\\y)|" error)
+ ("|x (\"y\")" error)
+ ("x| (\"y\")" error)
+ ("x |(\"y\")" error)
+ ("x (|\"y\")" "(x |\"y\")")
+ ("x (\"|y\")" "(x \"|y\")" "(\"x |y\")")
+ ("x (\"y|\")" "(x \"y|\")" "(\"x y|\")")
+ ("x (\"y\"|)" "(x \"y\"|)")
+ ("x (\"y\")|" error)))
(defun paredit-canary-indent-method (state indent-point normal-indent)
(check-parens)