catala/tests/test_metadata/good/test_markup_refactoring.catala_en
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

42 lines
580 B
Plaintext

# Test the refactored metatdata markup
```catala-metadata
declaration enumeration E:
-- A
-- B
declaration scope S:
context output a content E
```
Some law text...
```catala-metadata
declaration scope S2:
context output b content E
```
## PROGRAM
```catala
scope S:
definition a equals A
```
```catala
scope S2:
definition b equals B
```
```catala-test-inline
$ catala Interpret -s S2
[RESULT] Computation successful! Results:
[RESULT] b = B ()
```
```catala-test-inline
$ catala Interpret -s S
[RESULT] Computation successful! Results:
[RESULT] a = A ()
```