diff options
Diffstat (limited to 'tests/js/tcodegendeclproc.nim')
-rw-r--r-- | tests/js/tcodegendeclproc.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/js/tcodegendeclproc.nim b/tests/js/tcodegendeclproc.nim new file mode 100644 index 000000000..3acf0bc13 --- /dev/null +++ b/tests/js/tcodegendeclproc.nim @@ -0,0 +1,11 @@ +discard """ + output: ''' +-1 +8 +''' + ccodecheck: "'console.log(-1); function fac_' \\d+ '(n_' \\d+ ')'" +""" +proc fac(n: int): int {.codegenDecl: "console.log(-1); function $2($3)".} = + return n + +echo fac(8) |