aboutsummaryrefslogtreecommitdiff
path: root/sam-test.el
diff options
context:
space:
mode:
Diffstat (limited to 'sam-test.el')
-rw-r--r--sam-test.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/sam-test.el b/sam-test.el
index 1c6fafb..65536a6 100644
--- a/sam-test.el
+++ b/sam-test.el
@@ -6,7 +6,7 @@
(require 'ert)
(require 'sam)
-(ert-deftest sam-parse-command-test ()
+(ert-deftest sam-parse-line-test ()
(dolist (spec '(("3" "p" <- "3p")
("3" "p" <- "3 p")
("34" "p" <- "34\tp")
@@ -17,4 +17,12 @@
(should (string-equal exp-addr address))
(should (string-equal exp-cmd command))))))
+(ert-deftest sam-parse-command-test ()
+ (let ((spec '(("=#" -> "=#" sam-cmd-charoffset))))
+ (cl-loop
+ for (input _ exp-cmd exp-fn) in spec
+ do (cl-destructuring-bind (cmd . fn) (sam-parse-command input)
+ (should (string-equal exp-cmd cmd))
+ (should (string-equal exp-fn fn))))))
+
;; (ert-run-tests-interactively t)