diff --git a/tests/123.lm b/tests/123.lm index c15168a28..666f76139 100644 --- a/tests/123.lm +++ b/tests/123.lm @@ -1,2 +1,4 @@ -main := print "123" +main := ( + print_s 123 +); diff --git a/tests/c_cli.rs b/tests/c_cli.rs index 27739303a..c9f3125b9 100644 --- a/tests/c_cli.rs +++ b/tests/c_cli.rs @@ -22,3 +22,13 @@ fn compile_and_run(fp: &str) -> String { fn cli_123() { assert_eq!( compile_and_run("tests/123.lm"), "123" ); } + +#[test] +fn cli_nil() { + assert_eq!( compile_and_run("tests/nil.lm"), "()" ); +} + +#[test] +fn cli_cons() { + assert_eq!( compile_and_run("tests/cons.lm"), "(123 . (() . 456))" ); +} diff --git a/tests/cons.lm b/tests/cons.lm new file mode 100644 index 000000000..190dc3627 --- /dev/null +++ b/tests/cons.lm @@ -0,0 +1,4 @@ + +main := ( + print_s (123 () 456) +); diff --git a/tests/nil.lm b/tests/nil.lm new file mode 100644 index 000000000..024fe57d1 --- /dev/null +++ b/tests/nil.lm @@ -0,0 +1,4 @@ + +main := ( + print_s () +);