module parser asset scripts: path: ../asset/parser def expect_load_success using p of file: guard (file /= "") # TODO: forces (file :: String) send "load ${scripts.path}/$file.et" to p expect /load-([a-z-]+).*/ from p capture done guard (done == "done") def expect_load_failure using p of file giving error: guard (file /= "") # TODO: forces (file :: String) send "load ${scripts.path}/$file.et" to p expect /load-([a-z-]+) ([a-z-]+).*/ from p capture done, msg guard (done == "failed") guard (msg == error) test Parser: spawn as p expect_load_failure using p of "non-existing-file" giving "file-not-found" expect_load_success using p of "indent" expect_load_success using p of "function" expect_load_failure using p of "function-fail" giving "parse-error" expect_load_success using p of "tags"