Skip to content

Commit

Permalink
Fixup qif-imp price unit tests.
Browse files Browse the repository at this point in the history
The expected results changed with commit 80f7e60f49.
At the same time, improve readability of test results by
assigning a tag and ordering expected vs actual correctly.
  • Loading branch information
jwhite66 authored and jralls committed Sep 10, 2023
1 parent 34946c7 commit 737e732
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gnucash/import-export/qif-imp/test/test-qif-imp.scm
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@
(let ((parsed (qif-file:parse-price-line "\"ABC\",1.0,\"1/1/04\""))
(model (make-qif-price)))
(qif-price:set-symbol! model "ABC")
(qif-price:set-share-price! model "1.0")
(qif-price:set-share-price! model "1")
(qif-price:set-date! model "1/1/04")
(test-equal parsed model))
(test-equal "parse-price-line-decimal" model parsed))

(let ((parsed (qif-file:parse-price-line "\"ABC\",1 3/4,\"1/1' 4\""))
(model (make-qif-price)))
(qif-price:set-symbol! model "ABC")
(qif-price:set-share-price! model "1.75")
(qif-price:set-share-price! model "7/4")
(qif-price:set-date! model "1/1' 4")
(test-equal parsed model))
(test-equal "parse-price-line-fraction" parsed model))

(let ((parsed (qif-file:parse-price-line "\"ABC\",,\"1/1' 4\"")))
(test-equal parsed #f))
(test-equal "parse-price-line-empty" #f parsed))

(let ((parsed (qif-file:parse-price-line "\"ABC\",\"1/1' 4\"")))
(test-equal parsed #f)))
(test-equal "parse-price-line-missingcomma" #f parsed)))

0 comments on commit 737e732

Please sign in to comment.