1414# a commercial license, send an email to [email protected] . 1515import json
1616import os
17+ import platform
1718
1819import pytest
1920
@@ -83,6 +84,26 @@ def test_compile_with_simple_sketch(run_command, data_dir, working_dir):
8384 assert result .ok
8485 assert os .path .exists (target )
8586
87+
88+ @pytest .mark .skipif (
89+ running_on_ci () and platform .system () == "Windows" ,
90+ reason = "Test disabled on Github Actions Win VM until tmpdir inconsistent behavior bug is fixed" ,
91+ )
92+ def test_output_flag_default_path (run_command , data_dir , working_dir ):
93+ # Init the environment explicitly
94+ result = run_command ("core update-index" )
95+ assert result .ok
96+
97+ # Download latest AVR
98+ result = run_command ("core install arduino:avr" )
99+ assert result .ok
100+
101+ # Create a test sketch
102+ sketch_path = os .path .join (data_dir , "test_output_flag_default_path" )
103+ fqbn = "arduino:avr:uno"
104+ result = run_command ("sketch new {}" .format (sketch_path ))
105+ assert result .ok
106+
86107 # Test the --output flag defaulting to current working dir
87108 result = run_command (
88109 "compile -b {fqbn} {sketch_path} -o test" .format (
@@ -92,7 +113,7 @@ def test_compile_with_simple_sketch(run_command, data_dir, working_dir):
92113 assert result .ok
93114 assert os .path .exists (os .path .join (working_dir , "test.hex" ))
94115
95- # Test extention won't be added if already present
116+ # Test extension won't be added if already present
96117 result = run_command (
97118 "compile -b {fqbn} {sketch_path} -o test2.hex" .format (
98119 fqbn = fqbn , sketch_path = sketch_path
0 commit comments