diff options
author | Louis Pilfold <louis@lpil.uk> | 2021-11-02 18:54:12 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2021-11-02 18:54:12 +0000 |
commit | 007ef7ed3fad0f799f626af34642cc648791d332 (patch) | |
tree | e9042ab3a664d896e43eff7570b89de6fe3393bf /test/gleam_stdlib_test_ffi.erl | |
parent | b10c1b6364375d07e6bfd0dba5fcccd6ff4e28e6 (diff) | |
download | gleam_stdlib-007ef7ed3fad0f799f626af34642cc648791d332.tar.gz gleam_stdlib-007ef7ed3fad0f799f626af34642cc648791d332.zip |
Vendor eunit reporter until we can compile rebar libs
Diffstat (limited to 'test/gleam_stdlib_test_ffi.erl')
-rw-r--r-- | test/gleam_stdlib_test_ffi.erl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/gleam_stdlib_test_ffi.erl b/test/gleam_stdlib_test_ffi.erl new file mode 100644 index 0000000..61c82de --- /dev/null +++ b/test/gleam_stdlib_test_ffi.erl @@ -0,0 +1,22 @@ +-module(gleam_stdlib_test_ffi). + +-export([main/0]). + +main() -> + Options = [ + no_tty, {report, {eunit_progress, [colored]}} + ], + Files = filelib:wildcard("test/**/*.{erl,gleam}"), + Modules = lists:map(fun filepath_to_module/1, Files), + case eunit:test(Modules, Options) of + ok -> erlang:halt(0); + _ -> erlang:halt(1) + end. + +filepath_to_module(Path0) -> + Path1 = string:replace(Path0, "test/", ""), + Path2 = string:replace(Path1, ".erl", ""), + Path3 = string:replace(Path2, ".gleam", ""), + Path4 = string:replace(Path3, "/", "@", all), + Path5 = list_to_binary(Path4), + binary_to_atom(Path5). |