Denis Merigoux
9b056f3ca1
Update assets and fix errors after rebase
2023-04-27 12:18:50 +02:00
Denis Merigoux
75c2a24b98
Changed position formatting
2023-04-27 12:09:22 +02:00
adelaett
43c1fd9b7e
adding tests
2023-04-12 11:38:12 +02:00
Denis Merigoux
e80143b3ca
Last linting pass and update tests
2023-03-31 17:56:45 +02:00
Louis Gesbert
af2f5dbe19
Tweak error message location printing
2022-11-28 16:38:09 +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
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
e63bdf0634
More precise pattern matching when looking for source file in test framework
2021-01-23 20:57:31 -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
170bd7685f
Added error when a scope variable evaluates to empty
2020-12-09 11:23:03 +01:00