summaryrefslogtreecommitdiff
path: root/let-while-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'let-while-tests.el')
-rw-r--r--let-while-tests.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/let-while-tests.el b/let-while-tests.el
new file mode 100644
index 0000000..50e9356
--- /dev/null
+++ b/let-while-tests.el
@@ -0,0 +1,15 @@
+;;; let-while-tests.el -- tests for the let-while macro
+
+
+(defun let-while-test ()
+ (catch :io
+ (let ((lines '("line 1" "line 2")))
+ (noflet ((get-line ()
+ (or
+ (pop lines)
+ (throw :io :eof))))
+ (let-while (line (get-line))
+ (message "the line is: %s" line))))))
+
+
+;;; let-while-tests.el ends here