mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-09 01:35:56 +03:00
tests(lexer): add tests for the literate programming
This commit is contained in:
parent
c1ea39eb1b
commit
c317332218
@ -0,0 +1,2 @@
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] literate_parsing_is_ok = true
|
@ -0,0 +1,2 @@
|
||||
[RESULT] Computation successful! Results:
|
||||
[RESULT] literate_parsing_is_ok = true
|
@ -1,4 +1,4 @@
|
||||
## Law text should be able to contain '`'.
|
||||
## Law text should be able to contain grave accent '`'.
|
||||
|
||||
This is a block of law text containing `.
|
||||
This allows to:
|
||||
@ -16,10 +16,10 @@ let () = print_endline "Hello world!"
|
||||
**Remark**: for Fenced Code Blocks, ``` must be followed by a space or a new line.
|
||||
|
||||
```catala
|
||||
new scope Test :
|
||||
new scope A:
|
||||
param literate_parsing_is_ok content bool
|
||||
|
||||
scope Test :
|
||||
scope A:
|
||||
def literate_parsing_is_ok := true
|
||||
```
|
||||
|
26
tests/test_literate/good/test_grave_char.catala_en
Normal file
26
tests/test_literate/good/test_grave_char.catala_en
Normal file
@ -0,0 +1,26 @@
|
||||
## Law text should be able to contain grave accent '`'.
|
||||
|
||||
This is a block of law text containing `.
|
||||
This allows to:
|
||||
|
||||
* use `Markdown` code block inside `Catala` files,
|
||||
|
||||
* _escape_ special characters such as `#` or `>`,
|
||||
|
||||
* use Fenced Code Blocks:
|
||||
|
||||
```
|
||||
let () = print_endline "Hello world!"
|
||||
```
|
||||
|
||||
**Remark**: for Fenced Code Blocks, ``` must be followed by a space or a new line.
|
||||
|
||||
```catala
|
||||
declaration scope A:
|
||||
context literate_parsing_is_ok content boolean
|
||||
|
||||
scope A:
|
||||
definition literate_parsing_is_ok equals true
|
||||
```
|
||||
|
||||
Even after `Catala` code block.
|
26
tests/test_literate/good/test_grave_char.catala_fr
Normal file
26
tests/test_literate/good/test_grave_char.catala_fr
Normal file
@ -0,0 +1,26 @@
|
||||
## Law text should be able to contain grave accent '`'.
|
||||
|
||||
This is a block of law text containing `.
|
||||
This allows to:
|
||||
|
||||
* use `Markdown` code block inside `Catala` files,
|
||||
|
||||
* _escape_ special characters such as `#` or `>`,
|
||||
|
||||
* use Fenced Code Blocks:
|
||||
|
||||
```
|
||||
let () = print_endline "Hello world!"
|
||||
```
|
||||
|
||||
**Remark**: for Fenced Code Blocks, ``` must be followed by a space or a new line.
|
||||
|
||||
```catala
|
||||
déclaration champ d'application A:
|
||||
contexte literate_parsing_is_ok contenu booléen
|
||||
|
||||
champ d'application A:
|
||||
définition literate_parsing_is_ok égal à vrai
|
||||
```
|
||||
|
||||
Even after `Catala` code block.
|
Loading…
Reference in New Issue
Block a user