Skip to content

Fix sketch metadata loader #690

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 4 commits into from
May 7, 2020
Merged
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
Small test fix for Windows
Paths are converted to \ when extracting Parent().

=== RUN   TestSketchLoadingFromFolderOrMainFile
testdata/Sketch1 == testdata/Sketch1
testdata\Sketch1 == testdata/Sketch1
  • Loading branch information
cmaglie committed May 7, 2020
commit 319d045494748a9932472c13345851a9146042de
7 changes: 5 additions & 2 deletions arduino/sketches/sketches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package sketches

import (
"fmt"
"testing"

"github.com/arduino/go-paths-helper"
Expand All @@ -30,13 +31,15 @@ func TestSketchLoadingFromFolderOrMainFile(t *testing.T) {
sk, err := NewSketchFromPath(skFolder)
require.NoError(t, err)
require.Equal(t, sk.Name, "Sketch1")
require.True(t, sk.FullPath.EqualsTo(skFolder))
fmt.Println(sk.FullPath.String(), "==", skFolder.String())
require.True(t, sk.FullPath.EquivalentTo(skFolder))
}

{
sk, err := NewSketchFromPath(skMainIno)
require.NoError(t, err)
require.Equal(t, sk.Name, "Sketch1")
require.True(t, sk.FullPath.EqualsTo(skFolder))
fmt.Println(sk.FullPath.String(), "==", skFolder.String())
require.True(t, sk.FullPath.EquivalentTo(skFolder))
}
}