@@ -37,6 +37,30 @@ def test_compile_without_fqbn(run_command):
37
37
assert result .failed
38
38
39
39
40
+ def test_compile_error_message (run_command , working_dir ):
41
+ # Init the environment explicitly
42
+ run_command (["core" , "update-index" ])
43
+
44
+ # Download latest AVR
45
+ run_command (["core" , "install" , "arduino:avr" ])
46
+
47
+ # Run a batch of bogus compile in a temp dir to check the error messages
48
+ with tempfile .TemporaryDirectory () as tmp_dir :
49
+ tmp = Path (tmp_dir )
50
+ res = run_command (["compile" , "-b" , "arduino:avr:uno" , tmp / "ABCDEF" ])
51
+ assert res .failed
52
+ assert "missing" in res .stderr
53
+ assert "ABCDEF" in res .stderr
54
+ res = run_command (["compile" , "-b" , "arduino:avr:uno" , tmp / "ABCDEF" / "ABCDEF.ino" ])
55
+ assert res .failed
56
+ assert "missing" in res .stderr
57
+ assert "ABCDEF" in res .stderr
58
+ res = run_command (["compile" , "-b" , "arduino:avr:uno" , tmp / "ABCDEF" / "QWERTY" ])
59
+ assert res .failed
60
+ assert "missing" in res .stderr
61
+ assert "QWERTY" in res .stderr
62
+
63
+
40
64
def test_compile_with_simple_sketch (run_command , data_dir , working_dir ):
41
65
# Init the environment explicitly
42
66
run_command (["core" , "update-index" ])
0 commit comments