Skip to content

Commit

Permalink
Add test to show parsing error.
Browse files Browse the repository at this point in the history
  • Loading branch information
felideon committed Jan 27, 2012
1 parent e576306 commit bceb8e4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/csv.lisp
Expand Up @@ -63,6 +63,13 @@ Russ,Tyndall,\"Software Developer's, \"\"Position\"\"\",26.2,1")
Russ,Tyndall,\"Software Developer's,
\"\"Position\"\"\",26.2,1")

(defparameter *test-csv-data-waiting-next-error*
"\"Which of the following is an appropriate calming technique or statement:
A. \"\"I can help you.\"\"
B. \"\"Shut up.\"\"
C. \"\"If you don't calm down I'm not sending anyone.\"\"
D. \"\"Ma'am, ma'am\ ma'am!\"\"\",A")

(define-test parsing-1
(assert-equal *test-csv1-rows* (read-csv *test-csv1*))
(assert-equal *test-csv1-rows* (read-csv *test-csv1-v2*)))
Expand Down Expand Up @@ -127,4 +134,7 @@ multiline" (nth 3 (first data)) ))
(res (write-csv-row row :always-quote nil :newline #?"\n")))
(assert-equal "Russ,Tyndall,\"Software Developer's, \"\"Position\"\"\",26.2,1,\",\"
"
res)))
res)))

(define-test cause-error
(let ((data (read-csv *test-csv-data-waiting-next-error*)))))
Expand Down

0 comments on commit bceb8e4

Please sign in to comment.