Bug 797378 - QIF file import fails: Loading gives wrong type argument in position 2

This commit is contained in:
Christopher Lam 2019-08-29 20:08:18 +08:00
parent d4379644c2
commit bb4348fce9
2 changed files with 8 additions and 1 deletions

View File

@ -409,7 +409,9 @@
(if (null? amt-strings) (if (null? amt-strings)
formats formats
(lp (cdr amt-strings) (lp (cdr amt-strings)
(qif-parse:check-number-format (car amt-strings) formats))))) (if (car amt-strings)
(qif-parse:check-number-format (car amt-strings) formats)
formats)))))
;; list of number-strings and format -> list of numbers eg '("1,00" ;; list of number-strings and format -> list of numbers eg '("1,00"
;; "2,50" "3,99") 'comma --> '(1 5/2 399/100) this function would ;; "2,50" "3,99") 'comma --> '(1 5/2 399/100) this function would

View File

@ -248,6 +248,11 @@
(qif-parse:check-number-formats '("10.50" "20.54") (qif-parse:check-number-formats '("10.50" "20.54")
'(decimal comma integer))) '(decimal comma integer)))
(test-equal "qif-parse:check-number-formats 1234.00 #f"
'(comma)
(qif-parse:check-number-formats '("123,45" #f)
'(decimal comma integer)))
(test-equal "qif-parse:check-number-formats 1234 4567" (test-equal "qif-parse:check-number-formats 1234 4567"
'(decimal comma integer) '(decimal comma integer)
(qif-parse:check-number-formats '("1234" "4567") (qif-parse:check-number-formats '("1234" "4567")