David Tolnay
1628bbf95f
Clean up trailing whitespace
2015-07-19 09:38:50 -07:00
Nicolas Williams
fd4f4f2087
Make --run-tests' jv_test() quiet
2015-06-28 13:39:32 -05:00
Nicolas Williams
6c89186437
Make --run-tests less verbose by default
...
Adding --debug-trace or --debug-dump-disasm before --run-tests now makes
it verbose.
2015-06-27 23:31:44 -05:00
David Tolnay
4a316fbb5a
fix errors flagged by clang static analyzer
...
builtin.c: bug - free of uninitialized jv
compile.c: missing assertion
jq_test.c: buggy logic / unreachable code
jv.c: missing assertion
jv_alloc.c: false positive - intentional read of uninitialized memory
jv_file.c: dead code
2015-06-20 16:08:56 -05:00
David Tolnay
51a81c96f1
fix broken tests in manual.yml
2015-06-18 00:06:52 -05:00
Nicolas Williams
1dcfc2f547
Include filename and lineno in error messages
2015-03-30 15:56:29 -05:00
Nicolas Williams
d927a2c185
Fix --run-tests arg handling
2015-01-12 10:43:06 -06:00
Nicolas Williams
86bc662bd2
Move some module tests into all.test
2014-12-31 20:09:53 -06:00
Nicolas Williams
c959d1fca1
Fix lineno counting in jq_test.c
2014-12-30 11:28:50 -06:00
Nicolas Williams
63511a874f
Add support for testing erroneous programs
...
This will allow moving tests of some tests from tests/run to
tests/all.test. It will also be useful for more extensive testing of
language features where we want nice error messages, or errors at all,
to be produced, particularly language features where the errors arise at
compile-, codegen-, or link-time rather than parse-time.
This does not check for run-time errors though -- those we can already
check for with try/catch.
$ jq --run-tests
%%FAIL
break
jq: error: break used outside labeled control structure
^D
1 of 1 tests passed (0 malformed)
$
2014-12-30 10:55:30 -06:00
Nicolas Williams
90c705f138
Make --run-tests more informative
...
Print the line number and program text on the same output line where a
failure is reported, for all failures that were already reported on
lines starting with '***'. This makes poring over test logs with
failures much easier.
2014-12-30 10:55:30 -06:00
Nicolas Williams
7538ef34be
Make jq --run-tests show test line numbers
2014-12-27 18:15:10 -06:00
Nicolas Williams
2075bec60f
Fix #647 , but caused by 89791a0
2014-12-12 17:05:16 -06:00
Nicolas Williams
b349e7d9a8
Print stack value refcounts when tracing ( #636 )
2014-11-28 19:26:41 -06:00
Stephen Dolan
4ba0c8baef
Merge pull request #231 from DRMacIver/fix_mem_leak_in_compile
...
args to jq_compile_args were not getting freed when there were errors in the compile
2013-12-08 15:17:20 -08:00
Stephen Dolan
74a14f5de7
Refactor jv structure.
...
New structure layout is simpler and also faster. In particular, it's
now small enough to be passed in registers on amd64.
2013-12-08 17:46:23 +00:00
Stephen Dolan
fee21c959a
Make testsuite not leak when compiled with -DNDEBUG.
2013-12-08 17:44:54 +00:00
David R. MacIver
4b48054f41
test for losing memory on compile errors
2013-12-08 16:19:12 +00:00
Stephen Dolan
37cfc912c1
Remove #includes from jv.h
2013-06-23 14:23:07 +01:00
Nicolas Williams
298b2a6033
Add libjq autoconf goo
2013-06-21 11:57:12 -05:00
Nicolas Williams
da09544bb0
Remove accidentally introduced use of fopen "e"
2013-06-17 17:27:25 -05:00
Nicolas Williams
0ed6347d47
Allow --run-tests to take a file argument
2013-06-15 17:37:15 -05:00
Nicolas Williams
3f86e97f70
Fixup API to get closer to a libjq
2013-06-15 17:37:15 -05:00
Brendan Macmillan
d4018192a9
Stop warning on fgets, simple version
2013-06-01 11:12:28 +10:00
Brendan Macmillan
19ddbfeca9
Stop warning on fgets, complex version
2013-06-01 11:03:15 +10:00
Stephen Dolan
e83e51eb56
'length' function now measures string length in codepoints, not bytes.
2013-05-15 00:37:38 +01:00
Stephen Dolan
b0e65d149f
Fix a bug triggered by jv_array_slice.
2013-05-13 14:10:39 +01:00
Stephen Dolan
7ca5127fcc
Merge branch 'autotools'
2013-05-11 15:21:23 +01:00
Stephen Dolan
d121420757
Clean up autotools config.
...
Remove some of @stagrlee's hard work since jq's testsuite is
less silly than when he wrote the autotools config.
2013-05-08 02:42:23 +01:00
Stephen Dolan
2363246eea
Merge remote-tracking branch 'stagrlee/master' into autotools
...
Conflicts:
Makefile
jq_test.c
2013-05-08 00:52:24 +01:00
Nicolas Williams
fb3c124af1
Rename complex to nontrivial for safety ( #113 )
2013-05-07 18:46:13 -05:00
Stephen Dolan
1741d8c161
Remove JQ_DEBUG #define and jq_test binary, simplifying build.
...
The debugging features previously available via JQ_DEBUG are now
command-line options.
2013-05-05 23:12:10 +01:00
Stephen Dolan
c1748fa633
WIP
2013-05-05 22:59:53 +01:00
Stephen Dolan
a49402c53a
Combine the functionality of jq and jq_test
...
One binary is much simpler. ./jq --run-tests now runs the tests.
2013-05-05 22:59:53 +01:00
Nicolas Williams
87e9c64003
Remove globals/make jq_init/next/teardown() an API
2013-04-28 18:46:21 -05:00
Lee Thompson
52f906ab43
fix jq_test so that it runs in the distcheck phase of autoconf
2013-02-02 23:05:00 -06:00
Lee Thompson
c7725a8d4d
merging upstream stedolan changes
2013-02-02 20:39:23 -06:00
Stephen Dolan
73c657cdc4
Lots of build system and docs improvements, including a manpage.
...
- Build binaries for multiple platforms
- Make a manpage out of the manual (see #19 )
- Extract more tests from the documentation
- Fix a few documentation bugs uncovered by above.
2012-12-16 13:06:03 +00:00
Lee Thompson
a156fb19de
get testing working in autoconf
2012-12-04 19:50:10 -06:00
Stephen Dolan
c8bbfed041
See, I told you colour was a bad idea! #11
...
Last commit broke the build, minor fix needed to testsuite.
2012-12-03 02:00:29 +00:00
Stephen Dolan
20e45f363c
Separate the tests and the main program.
2012-09-18 22:17:13 +01:00