summaryrefslogtreecommitdiff
path: root/test.el
diff options
context:
space:
mode:
Diffstat (limited to 'test.el')
-rw-r--r--test.el98
1 files changed, 98 insertions, 0 deletions
diff --git a/test.el b/test.el
index 2125141..c42f018 100644
--- a/test.el
+++ b/test.el
@@ -1207,6 +1207,104 @@ Four arguments: the paredit command, the text of the buffer
;++ ("(\"|foo\\\;bar\")" error)
))
+(paredit-test 'paredit-forward-slurp-sexp
+ '(("|" error)
+ ("|()" error)
+ ;; ("(|)" error) ;++ Urk...
+ ("()|" error)
+ ("|() foo" error)
+ ("(|) foo" "(|foo)")
+ ("()| foo" error)
+ ("() |foo" error)
+ ("() f|oo" error)
+ ("() fo|o" error)
+ ("() foo|" error)
+ ("|(foo) bar" error)
+ ("(|foo) bar" "(|foo bar)")
+ ("(f|oo) bar" "(f|oo bar)")
+ ("(fo|o) bar" "(fo|o bar)")
+ ("(foo|) bar" "(foo| bar)")
+ ("(foo)| bar" error)
+ ("(foo) |bar" error)
+ ("(foo) b|ar" error)
+ ("(foo) ba|r" error)
+ ("(foo) bar|" error)
+ ("|\"\"" error)
+ ;; ("\"|\"" error) ;++ Urk...
+ ("\"\"|" error)
+ ("|\"\" foo" error)
+ ("\"|\" foo" "\"|foo\"")
+ ("\"\"| foo" error)
+ ("\"\" |foo" error)
+ ("\"\" f|oo" error)
+ ("\"\" fo|o" error)
+ ("\"\" foo|" error)
+ ("|\"foo\" bar" error)
+ ("\"|foo\" bar" "\"|foo bar\"")
+ ("\"f|oo\" bar" "\"f|oo bar\"")
+ ("\"fo|o\" bar" "\"fo|o bar\"")
+ ("\"foo|\" bar" "\"foo| bar\"")
+ ("\"foo\"| bar" error)
+ ("\"foo\" |bar" error)
+ ("\"foo\" b|ar" error)
+ ("\"foo\" ba|r" error)
+ ("\"foo\" bar|" error)
+ ("|\"\" \"\"" error)
+ ("\"|\" \"\"" "\"|\\\"\\\"\"")
+ ("\"\"| \"\"" error)
+ ("\"\" |\"\"" error)
+ ;; ("\"\" \"|\"" error) ;++ Urk...
+ ("\"\" \"\"|" error)))
+
+(paredit-test 'paredit-backward-slurp-sexp
+ '(("|" error)
+ ("|()" error)
+ ;; ("(|)" error) ;++ Urk...
+ ("()|" error)
+ ("|foo ()" error)
+ ("f|oo ()" error)
+ ("fo|o ()" error)
+ ("foo| ()" error)
+ ("foo |()" error)
+ ("foo (|)" "(foo|)")
+ ("foo ()|" error)
+ ("|foo (bar)" error)
+ ("f|oo (bar)" error)
+ ("fo|o (bar)" error)
+ ("foo| (bar)" error)
+ ("foo |(bar)" error)
+ ("foo (|bar)" "(foo |bar)")
+ ("foo (b|ar)" "(foo b|ar)")
+ ("foo (ba|r)" "(foo ba|r)")
+ ("foo (bar|)" "(foo bar|)")
+ ("foo (bar)|" error)
+ ("|\"\"" error)
+ ;; ("\"|\"" error) ;++ Urk...
+ ("\"\"|" error)
+ ("|foo \"\"" error)
+ ("f|oo \"\"" error)
+ ("fo|o \"\"" error)
+ ("foo| \"\"" error)
+ ("foo |\"\"" error)
+ ("foo \"|\"" "\"foo|\"")
+ ("foo \"\"|" error)
+ ("|foo \"bar\"" error)
+ ("f|oo \"bar\"" error)
+ ("fo|o \"bar\"" error)
+ ("foo| \"bar\"" error)
+ ("foo |\"bar\"" error)
+ ("foo \"|bar\"" "\"foo |bar\"")
+ ("foo \"b|ar\"" "\"foo b|ar\"")
+ ("foo \"ba|r\"" "\"foo ba|r\"")
+ ("foo \"bar|\"" "\"foo bar|\"")
+ ("foo \"bar\"|" error)
+ ("|\"\" \"\"" error)
+ ;; ("\"|\" \"\"" error) ;++ Urk...
+ ("\"\"| \"\"" error)
+ ("\"\" |\"\"" error)
+ ("\"\" \"|\"" "\"\\\"\\\"|\"")
+ ("\"\" \"\"|" error)))
+
(defun paredit-canary-indent-method (state indent-point normal-indent)
(check-parens)
nil)