Skip to content

Commit eb1195d

Browse files
committed
Added test
1 parent 04f078b commit eb1195d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: test/test_compile.py

+22
Original file line numberDiff line numberDiff line change
@@ -594,3 +594,25 @@ def test_compile_with_custom_libraries(run_command, copy_sketch):
594594
# This compile command has been taken from this issue:
595595
# https://github.com/arduino/arduino-cli/issues/973
596596
assert run_command(f"compile --libraries {first_lib},{second_lib} -b {fqbn} {sketch_path}")
597+
598+
599+
def test_compile_with_archives_and_long_paths(run_command):
600+
# Creates config with additional URL to install necessary core
601+
url = "http://arduino.esp8266.com/stable/package_esp8266com_index.json"
602+
assert run_command(f"config init --dest-dir . --additional-urls {url}")
603+
604+
# Init the environment explicitly
605+
assert run_command("update")
606+
607+
# Install core to compile
608+
assert run_command("core install esp8266:esp8266")
609+
610+
# Install test library
611+
assert run_command("lib install ArduinoIoTCloud")
612+
613+
result = run_command("lib examples ArduinoIoTCloud --format json")
614+
assert result.ok
615+
lib_output = json.loads(result.stdout)
616+
sketch_path = Path(lib_output[0]["library"]["install_dir"], "examples", "ArduinoIoTCloud-Advanced")
617+
618+
assert run_command(f"compile -b esp8266:esp8266:huzzah {sketch_path}")

0 commit comments

Comments
 (0)