diff options
Diffstat (limited to 'tests/custom/04_modules/02_export_function_declaration')
-rw-r--r-- | tests/custom/04_modules/02_export_function_declaration | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/custom/04_modules/02_export_function_declaration b/tests/custom/04_modules/02_export_function_declaration new file mode 100644 index 0000000..4067da9 --- /dev/null +++ b/tests/custom/04_modules/02_export_function_declaration @@ -0,0 +1,22 @@ +A named function declaration can be prepended with `export` to +automatically export the function. + +-- File test-func-decl.uc -- +export function func() { + print("Hello, world!\n"); +}; +-- End -- + +-- Testcase -- +import { func } from "./files/test-func-decl.uc"; + +func(); +-- End -- + +-- Args -- +-R +-- End -- + +-- Expect stdout -- +Hello, world! +-- End -- |