瀏覽代碼

add tests showing equality between semicolon and newline

Nils Boettcher 2 月之前
父節點
當前提交
40e964c47d
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      numbat/tests/interpreter.rs

+ 5 - 0
numbat/tests/interpreter.rs

@@ -500,6 +500,11 @@ fn test_misc_examples() {
     expect_output("3m/4m", "0.75");
     expect_output("4/2*2", "4");
     expect_output("1/2 Hz -> s", "0.5 s");
+
+    expect_output("let b = \";\"; b", "\";\"");
+    expect_output("let b = \";\"\nb", "\";\"");
+    expect_output("let a = 3m; 5; a", "3 m");
+    expect_output("let a = 3m\n5\na", "3 m");
 }
 
 #[test]