Skip to content

Command sketch new do not join sketchbook path to sketch name if only sketchname is provided #396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
align current tests to new behaviour
  • Loading branch information
Roberto Sora committed Sep 11, 2019
commit 5aae182249e2a477eddb84733d7745d6d8f90edd
4 changes: 2 additions & 2 deletions cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,11 @@ func TestCompileCommandsIntegration(t *testing.T) {
require.Zero(t, exitCode)

// Create a test sketch
exitCode, d := executeWithArgs("sketch", "new", "Test1")
test1 := filepath.Join(currSketchbookDir, "Test1")
exitCode, d := executeWithArgs("sketch", "new", test1)
require.Zero(t, exitCode)

// Build sketch without FQBN
test1 := filepath.Join(currSketchbookDir, "Test1")
exitCode, d = executeWithArgs("compile", test1)
require.NotZero(t, exitCode)
require.Contains(t, string(d), "no FQBN provided")
Expand Down
4 changes: 2 additions & 2 deletions test/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_compile_with_simple_sketch(run_command, data_dir):
fqbn = "arduino:avr:uno"

# Create a test sketch
result = run_command("sketch new {}".format(sketch_name))
result = run_command("sketch new {}".format(sketch_path))
assert result.ok
assert "Sketch created in: {}".format(sketch_path) in result.stdout

Expand Down Expand Up @@ -83,7 +83,7 @@ def test_compile_and_compile_combo(run_command, data_dir):
# Create a test sketch
sketch_name = "CompileAndUploadIntegrationTest"
sketch_path = os.path.join(data_dir, sketch_name)
result = run_command("sketch new CompileAndUploadIntegrationTest")
result = run_command("sketch new {}".format(sketch_path))
assert result.ok
assert "Sketch created in: {}".format(sketch_path) in result.stdout

Expand Down