more test tweaks
This commit is contained in:
parent
484580ca64
commit
3b9c6448be
8
Makefile
8
Makefile
@ -93,7 +93,7 @@ tools/doctest: tools/doctest.hs
|
|||||||
|
|
||||||
# build the shell test runner
|
# build the shell test runner
|
||||||
tools/shelltest: tools/shelltest.hs
|
tools/shelltest: tools/shelltest.hs
|
||||||
ghc --make -threaded tools/shelltest.hs
|
ghc --make -threaded -O2 tools/shelltest.hs
|
||||||
|
|
||||||
# build the generateledger tool
|
# build the generateledger tool
|
||||||
tools/generateledger: tools/generateledger.hs
|
tools/generateledger: tools/generateledger.hs
|
||||||
@ -103,16 +103,16 @@ tools/generateledger: tools/generateledger.hs
|
|||||||
# TESTING
|
# TESTING
|
||||||
|
|
||||||
# quick code tests - run all the time
|
# quick code tests - run all the time
|
||||||
test: unittest doctest haddocktest
|
test: unittest doctest functest haddocktest
|
||||||
|
|
||||||
# moderate pre-commit tests
|
# moderate pre-commit tests
|
||||||
# run before recording or before send/pushing, your choice
|
# run before recording or before send/pushing, your choice
|
||||||
committest: unittest doctest haddocktest warningstest
|
committest: unittest doctest functest haddocktest warningstest
|
||||||
@(cabal configure -fvty -fhapps \
|
@(cabal configure -fvty -fhapps \
|
||||||
&& echo $@ passed) || echo $@ FAILED
|
&& echo $@ passed) || echo $@ FAILED
|
||||||
|
|
||||||
# thorough, pre-release tests - run before release
|
# thorough, pre-release tests - run before release
|
||||||
releasetest: unittest doctest haddocktest warningstest cabaltest
|
releasetest: unittest doctest functest haddocktest warningstest cabaltest
|
||||||
|
|
||||||
# run unit tests, without waiting for compilation
|
# run unit tests, without waiting for compilation
|
||||||
unittest:
|
unittest:
|
||||||
|
|||||||
4
Tests.hs
4
Tests.hs
@ -165,11 +165,12 @@ $ printf "2009-01-01 x\n a 2\n b (b) b -1\n c\n" | hledger -f - print 2>&1;
|
|||||||
Nafai's bug
|
Nafai's bug
|
||||||
@
|
@
|
||||||
$ printf "2009/1/1 x\n a: 13\n b\n" | hledger -f - bal -E 2>&1; true
|
$ printf "2009/1/1 x\n a: 13\n b\n" | hledger -f - bal -E 2>&1; true
|
||||||
"-" (line 2, column 1):
|
hledger: parse error at (line 1, column 4):
|
||||||
unexpected " "
|
unexpected " "
|
||||||
accountname seems ill-formed: a:
|
accountname seems ill-formed: a:
|
||||||
@
|
@
|
||||||
|
|
||||||
|
|
||||||
Eliding, general layout
|
Eliding, general layout
|
||||||
@
|
@
|
||||||
$ printf "2009/1/1 x\n aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1\n b\n" | hledger -f - bal 2>&1
|
$ printf "2009/1/1 x\n aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1\n b\n" | hledger -f - bal 2>&1
|
||||||
@ -189,7 +190,6 @@ $ printf "2009/1/1 x\n aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaa
|
|||||||
aa:aaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa
|
aa:aaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa
|
||||||
b
|
b
|
||||||
@
|
@
|
||||||
|
|
||||||
-}
|
-}
|
||||||
-- other test tools:
|
-- other test tools:
|
||||||
-- http://hackage.haskell.org/cgi-bin/hackage-scripts/package/test-framework
|
-- http://hackage.haskell.org/cgi-bin/hackage-scripts/package/test-framework
|
||||||
|
|||||||
8
tests/eliding-balance.test
Normal file
8
tests/eliding-balance.test
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
balance
|
||||||
|
<<<
|
||||||
|
2009/1/1 x
|
||||||
|
aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1
|
||||||
|
b
|
||||||
|
>>>
|
||||||
|
€1 aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa
|
||||||
|
€-1 b
|
||||||
9
tests/eliding-print.test.disabled
Normal file
9
tests/eliding-print.test.disabled
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
print
|
||||||
|
<<<
|
||||||
|
2009/1/1 x
|
||||||
|
aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1
|
||||||
|
b
|
||||||
|
>>>
|
||||||
|
2009/01/01 x
|
||||||
|
aa:aaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa
|
||||||
|
b
|
||||||
7
tests/eliding-register.test.disabled
Normal file
7
tests/eliding-register.test.disabled
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
register
|
||||||
|
<<<
|
||||||
|
2009/1/1 x aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa:aaaaaaaaaaaaaaaaaaaa €1
|
||||||
|
b
|
||||||
|
>>>
|
||||||
|
2009/01/01 x aa:aa:aaaaaaaaaaaaaaaa €1 €1
|
||||||
|
b €-1 0
|
||||||
10
tests/null-accountname-component.test
Normal file
10
tests/null-accountname-component.test
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
balance -E
|
||||||
|
<<<
|
||||||
|
2009/1/1 x
|
||||||
|
a: 13
|
||||||
|
b
|
||||||
|
>>>2
|
||||||
|
hledger: parse error at (line 1, column 4):
|
||||||
|
unexpected " "
|
||||||
|
accountname seems ill-formed: a:
|
||||||
|
===1
|
||||||
12
tests/parens-in-account-name.test
Normal file
12
tests/parens-in-account-name.test
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
print
|
||||||
|
<<<
|
||||||
|
2009-01-01 x
|
||||||
|
a 2
|
||||||
|
b (b) b -1
|
||||||
|
c
|
||||||
|
>>>
|
||||||
|
2009/01/01 x
|
||||||
|
a 2
|
||||||
|
b (b) b -1
|
||||||
|
c
|
||||||
|
|
||||||
7
tests/unicode-account-matching.test
Normal file
7
tests/unicode-account-matching.test
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
register τράπ
|
||||||
|
<<<
|
||||||
|
2009-01-01 проверка
|
||||||
|
τράπεζα 10 руб
|
||||||
|
नकद
|
||||||
|
>>>
|
||||||
|
2009/01/01 проверка τράπεζα 10 руб 10 руб
|
||||||
8
tests/unicode-balance.test
Normal file
8
tests/unicode-balance.test
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
balance
|
||||||
|
<<<
|
||||||
|
2009-01-01 проверка
|
||||||
|
τράπεζα 10 руб
|
||||||
|
नकद
|
||||||
|
>>>
|
||||||
|
10 руб τράπεζα
|
||||||
|
-10 руб नकद
|
||||||
11
tests/unicode-description-matching.test
Normal file
11
tests/unicode-description-matching.test
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
register desc:аура
|
||||||
|
<<<
|
||||||
|
2009-01-01 аура (cyrillic letters)
|
||||||
|
bank 10
|
||||||
|
cash
|
||||||
|
2010-01-01 aypa (roman letters)
|
||||||
|
bank 20
|
||||||
|
cash
|
||||||
|
>>>
|
||||||
|
2009/01/01 аура (cyrillic let.. bank 10 10
|
||||||
|
cash -10 0
|
||||||
12
tests/unicode-error-message.test.disabled
Normal file
12
tests/unicode-error-message.test.disabled
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
; not implemented yet
|
||||||
|
balance >/dev/null
|
||||||
|
<<<
|
||||||
|
2009-01-01 broken entry
|
||||||
|
дебит 1
|
||||||
|
кредит -2
|
||||||
|
>>>2
|
||||||
|
hledger: could not balance this transaction, amounts do not add up to zero:
|
||||||
|
2009/01/01 broken entry
|
||||||
|
дебит 1
|
||||||
|
кредит -2
|
||||||
|
|
||||||
10
tests/unicode-print.test
Normal file
10
tests/unicode-print.test
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
print
|
||||||
|
<<<
|
||||||
|
2009-01-01 проверка
|
||||||
|
счёт:первый 1
|
||||||
|
счёт:второй
|
||||||
|
>>>
|
||||||
|
2009/01/01 проверка
|
||||||
|
счёт:первый 1
|
||||||
|
счёт:второй
|
||||||
|
|
||||||
8
tests/unicode-register.test
Normal file
8
tests/unicode-register.test
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
register
|
||||||
|
<<<
|
||||||
|
2009-01-01 проверка
|
||||||
|
τράπεζα 10 руб
|
||||||
|
नकद
|
||||||
|
>>>
|
||||||
|
2009/01/01 проверка τράπεζα 10 руб 10 руб
|
||||||
|
नकद -10 руб 0
|
||||||
12
tests/virtual.test
Normal file
12
tests/virtual.test
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
print
|
||||||
|
<<<
|
||||||
|
2009/1/1 x
|
||||||
|
(virtual) 100
|
||||||
|
a 1
|
||||||
|
b
|
||||||
|
>>>
|
||||||
|
2009/01/01 x
|
||||||
|
(virtual) 100
|
||||||
|
a 1
|
||||||
|
b
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user