summaryrefslogtreecommitdiff
path: root/test.el
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2013-04-07 16:35:27 +0000
committerTaylor R Campbell <campbell@mumble.net>2013-04-07 16:35:27 +0000
commitdb829365197d1400c229b5bedfd1a06c7754a30a (patch)
treec690bfc53f591885ecb280e7d95f864ff05ee7c8 /test.el
parent460254d20624057f8ededfeb822891492c908c66 (diff)
Make `paredit-forward' and `paredit-backward' move out of strings.
Diffstat (limited to 'test.el')
-rw-r--r--test.el122
1 files changed, 122 insertions, 0 deletions
diff --git a/test.el b/test.el
index ba71788..bf9d9bf 100644
--- a/test.el
+++ b/test.el
@@ -741,6 +741,128 @@ Four arguments: the paredit command, the text of the buffer
("\"x|y\"" error)
("\"xy|\"" error)))
+(paredit-test 'paredit-forward
+ '(("|" "|")
+
+ ("|()" "()|" "()|")
+ ("(|)" "()|" "()|")
+ ("()|" "()|")
+
+ ("|( )" "( )|" "( )|")
+ ("(| )" "( )|" "( )|")
+ ("( |)" "( )|" "( )|")
+ ("( )|" "( )|")
+
+ ("|\"\"" "\"\"|" "\"\"|")
+ ("\"|\"" "\"\"|" "\"\"|")
+ ("\"\"|" "\"\"|")
+
+ ("|\")\"" "\")\"|" "\")\"|")
+ ("\"|)\"" "\")|\"" "\")\"|" "\")\"|")
+ ("\")|\"" "\")\"|" "\")\"|")
+ ("\")\"|" "\")\"|")
+
+ ("|\"()\"" "\"()\"|" "\"()\"|")
+ ("\"|()\"" "\"()|\"" "\"()\"|" "\"()\"|")
+ ("\"(|)\"" "\"()|\"" "\"()\"|" "\"()\"|")
+ ("\"()\"|" "\"()\"|")
+
+ ("|(\"x\" \"y\")" "(\"x\" \"y\")|" "(\"x\" \"y\")|")
+ ("(|\"x\" \"y\")" "(\"x\"| \"y\")" "(\"x\" \"y\"|)"
+ "(\"x\" \"y\")|" "(\"x\" \"y\")|")
+ ("(\"|x\" \"y\")" "(\"x|\" \"y\")" "(\"x\"| \"y\")" "(\"x\" \"y\"|)"
+ "(\"x\" \"y\")|" "(\"x\" \"y\")|")
+ ("(\"x|\" \"y\")" "(\"x\"| \"y\")" "(\"x\" \"y\"|)"
+ "(\"x\" \"y\")|" "(\"x\" \"y\")|")
+ ("(\"x\"| \"y\")" "(\"x\" \"y\"|)" "(\"x\" \"y\")|" "(\"x\" \"y\")|")
+ ("(\"x\" |\"y\")" "(\"x\" \"y\"|)" "(\"x\" \"y\")|" "(\"x\" \"y\")|")
+ ("(\"x\" \"|y\")" "(\"x\" \"y|\")" "(\"x\" \"y\"|)"
+ "(\"x\" \"y\")|" "(\"x\" \"y\")|")
+ ("(\"x\" \"y|\")" "(\"x\" \"y\"|)" "(\"x\" \"y\")|" "(\"x\" \"y\")|")
+ ("(\"x\" \"y\"|)" "(\"x\" \"y\")|" "(\"x\" \"y\")|")
+ ("(\"x\" \"y\")|" "(\"x\" \"y\")|")
+
+ ("|#\\(" "#\\(|" "#\\(|")
+ ("#|\\(" "#\\(|" "#\\(|")
+ ("#\\|(" "#\\(|" "#\\(|")
+ ("#\\(|" "#\\(|")
+
+ ("|#\\)" "#\\)|" "#\\)|")
+ ("#|\\)" "#\\)|" "#\\)|")
+ ("#\\|)" "#\\)|" "#\\)|")
+ ("#\\)|" "#\\)|")
+
+ ("|#\\\\" "#\\\\|" "#\\\\|")
+ ("#|\\\\" "#\\\\|" "#\\\\|")
+ ("#\\|\\" "#\\\\|" "#\\\\|")
+ ("#\\\\|" "#\\\\|")
+
+ ("|#\\;" "#\\;|" "#\\;|")
+ ("#|\\;" "#\\;|" "#\\;|")
+ ("#\\|;" "#\\;|" "#\\;|")
+ ("#\\;|" "#\\;|")))
+
+(paredit-test 'paredit-backward
+ '(("|" "|")
+
+ ("|()" "|()")
+ ("(|)" "|()" "|()")
+ ("()|" "|()" "|()")
+
+ ("|( )" "|( )")
+ ("(| )" "|( )" "|( )")
+ ("( |)" "|( )" "|( )")
+ ("( )|" "|( )" "|( )")
+
+ ("|\"\"" "|\"\"")
+ ("\"|\"" "|\"\"" "|\"\"")
+ ("\"\"|" "|\"\"" "|\"\"")
+
+ ("|\")\"" "|\")\"")
+ ("\"|)\"" "|\")\"" "|\")\"")
+ ("\")|\"" "|\")\"" "|\")\"")
+ ("\")\"|" "|\")\"" "|\")\"")
+
+ ("|\"()\"" "|\"()\"")
+ ("\"|()\"" "|\"()\"" "|\"()\"")
+ ("\"(|)\"" "\"|()\"" "|\"()\"" "|\"()\"")
+ ("\"()\"|" "|\"()\"" "|\"()\"")
+
+ ("|(\"x\" \"y\")" "|(\"x\" \"y\")")
+ ("(|\"x\" \"y\")" "|(\"x\" \"y\")" "|(\"x\" \"y\")")
+ ("(\"|x\" \"y\")" "(|\"x\" \"y\")" "|(\"x\" \"y\")" "|(\"x\" \"y\")")
+ ("(\"x|\" \"y\")" "(\"|x\" \"y\")" "(|\"x\" \"y\")"
+ "|(\"x\" \"y\")" "|(\"x\" \"y\")")
+ ("(\"x\"| \"y\")" "(|\"x\" \"y\")" "|(\"x\" \"y\")" "|(\"x\" \"y\")")
+ ("(\"x\" |\"y\")" "(|\"x\" \"y\")" "|(\"x\" \"y\")" "|(\"x\" \"y\")")
+ ("(\"x\" \"|y\")" "(\"x\" |\"y\")" "(|\"x\" \"y\")"
+ "|(\"x\" \"y\")" "|(\"x\" \"y\")")
+ ("(\"x\" \"y|\")" "(\"x\" \"|y\")" "(\"x\" |\"y\")" "(|\"x\" \"y\")"
+ "|(\"x\" \"y\")" "|(\"x\" \"y\")")
+ ("(\"x\" \"y\"|)" "(\"x\" |\"y\")" "(|\"x\" \"y\")"
+ "|(\"x\" \"y\")" "|(\"x\" \"y\")")
+ ("(\"x\" \"y\")|" "|(\"x\" \"y\")" "|(\"x\" \"y\")")
+
+ ("|#\\(" "|#\\(")
+ ("#|\\(" "|#\\(" "|#\\(")
+ ("#\\|(" "|#\\(" "|#\\(")
+ ("#\\(|" "|#\\(" "|#\\(")
+
+ ("|#\\)" "|#\\)")
+ ("#|\\)" "|#\\)" "|#\\)")
+ ("#\\|)" "|#\\)" "|#\\)")
+ ("#\\)|" "|#\\)" "|#\\)")
+
+ ("|#\\\\" "|#\\\\")
+ ("#|\\\\" "|#\\\\" "|#\\\\")
+ ("#\\|\\" "|#\\\\" "|#\\\\")
+ ("#\\\\|" "|#\\\\" "|#\\\\")
+
+ ("|#\\;" "|#\\;")
+ ("#|\\;" "|#\\;" "|#\\;")
+ ("#\\|;" "|#\\;" "|#\\;")
+ ("#\\;|" "|#\\;" "|#\\;")))
+
(defun paredit-canary-indent-method (state indent-point normal-indent)
(check-parens)
nil)