Denis Merigoux
eee9946847
Fix extra error on empty
2022-12-02 12:07:26 +01:00
Denis Merigoux
6523181ec7
Wrote unit tests before fix
2022-12-01 18:14:03 +01:00
Louis Gesbert
4d4dac6727
Some fancy unicode for error outlines
...
Normally I would make sure this is not by default, or at leat disableable; but
here the code we print may contain utf8 anyway, so the terminal really needs to
support it. Anyway, it's just a little fancier, doesn't add much.
2022-11-07 14:13:01 +01:00
Louis Gesbert
429911024c
Add parseable line-column info to error messages
...
a quick fix for now, ideally we want an option for editor-friendly output.
But for now this is a very cheap way to at least have clickable error messages
which are a big time-saver.
2022-11-07 14:03:38 +01:00
Louis Gesbert
8c1696d0ff
Inline tests: cleanup trailing whitespace
2022-09-23 16:56:21 +02:00
Louis Gesbert
0c0ef1ae1a
Add test return codes
...
Simply re-generated with 'make tests CLERK_OPTS=--reset'
2022-09-23 14:50:02 +02:00
Louis Gesbert
0ab7a0f9ce
Turn all existing tests to inline tests
...
Done using
```bash
process() { FILE=$1; awk 'match($0, /^```catala-test *{ *id *= *"(.*)" *}/, a) {print "```catala-test-inline"; f="'"$(dirname $FILE)/output/$(basename $FILE)"'." a[1]; getline; print "$ " $0; while ((getline<f) > 0) print; next} {print}' $FILE >$FILE.new; mv $FILE.new $FILE; }
for f in tests/test_*/*/*.catala_* examples/**/*.catala_*; do process $f; git add $f; done
for d in $(find -name output -type d); do git rm -r $d; done
```
2022-09-23 14:45:10 +02:00
Denis Merigoux
3895743f20
Cleaned code for generating exception graph, now correct and fully general
...
Missing some encoding optimizations
2022-07-22 12:25:41 +02:00
Louis Gesbert
2e5050481d
Register all existing tests through the new engine
...
I removed the '.out' extension for now to preserve the test output file names and avoid a million file renames.
This makes the patch easier to read, and we can do the rename easily in another patch afterwards, without mixing with semantic changes.
(beautiful script àlarrache:
```bash
for f in */*/output/*; do
target_base=${f##*/}
target_base=${target_base%%.*}
echo $f | awk -F. '{
f=$1"."$2; if ($4 == "") { mode=$3; id=$3 } else { scope="-s "$3; mode=$4; id=$3"."$4}
printf "\n```catala-test {id=\"%s\"}\ncatala %s %s\n```\n",id,mode,scope;
}' >> $(dirname $f)/../${target_base}.*; done
```
2022-07-08 17:06:20 +02:00
Romain PRIMET
eafab30809
fix typo
2022-04-07 22:43:05 +02:00
Denis Merigoux
2263dd7dab
Update syntax highlighting and test suite [skip ci]
2022-02-07 12:04:48 +01:00
Denis Merigoux
b2a5551961
Test folders, nice doc and messages
2022-01-11 12:51:34 +01:00
Denis Merigoux
2b6e7c8b98
Working prototype of clerk, the new build system for Catala
2022-01-10 17:57:58 +01:00
Denis Merigoux
909e539cdc
Fixed all bugs
2022-01-05 15:57:18 +01:00
Denis Merigoux
56baf91923
Remove prefixes to each line in messages, keep only first line
2021-11-06 23:04:12 +01:00
EmileRolley
0ffbb9b266
refactor(tests)!: migrate test file from the abbreviated syntax to the english one
2021-05-26 21:16:29 +02:00
Denis Merigoux
3c8d187be0
Big refactoring of the literate programming structure
...
Partially fixes #120
Removes the distinction between headers and articles, streamlines the surface AST
Changes affects lexers and parser
2021-05-15 01:16:08 +02:00
EmileRolley
c0a9344eca
refactor(tests): update tests based on the abbreviated english lexer
2021-03-09 22:07:31 +01:00
Aymeric Fromherz
ba03d2db78
Move tests to appropriate folders
2021-01-25 01:16:46 -05:00
Aymeric Fromherz
483400ea19
Move tests to their appropriate directory
2021-01-23 20:49:17 -05:00
Denis Merigoux
4d1d3a2e1c
Reset tests
2021-01-20 19:21:02 +01:00
Denis Merigoux
6787d5b882
Fixes the exception tree building algorithm
2021-01-13 19:07:35 +01:00
Denis Merigoux
a37357bb56
Array type is beginning to work
2020-12-29 22:26:10 +01:00
Denis Merigoux
ea1611cd41
Flipped defaults to an exception-based structured
2020-12-18 15:59:15 +01:00
Denis Merigoux
ebf14f6121
Added assertions, starting to execute section132
2020-12-10 18:11:43 +01:00
Denis Merigoux
5abb73157f
Fix content/type lexer issue in nv
2020-12-06 18:09:48 +01:00
Denis Merigoux
43829d65a6
Added more tests
2020-12-03 18:59:14 +01:00
Denis Merigoux
3d48effb17
Fix all tests
2020-11-27 19:09:16 +01:00
Denis Merigoux
80ef321123
Better func test
2020-11-27 19:00:08 +01:00
Denis Merigoux
180d56df13
Better error messages
2020-11-27 18:36:38 +01:00
Denis Merigoux
ae1c2c6e02
Passing all tests!
2020-11-27 17:21:37 +01:00
Denis Merigoux
0443221e8b
Fixed functions
2020-11-27 16:27:10 +01:00
Denis Merigoux
cdfa9038cf
Literate programming AST now tree-shaped
2020-10-04 01:25:37 +02:00
Denis Merigoux
0f43975182
Cleaned lexing code and rationalized non-verbose syntax
2020-08-08 18:32:44 +02:00
Nicolas Chataing
70c6a833e2
Add function test
2020-08-06 20:59:25 +02:00