Skip to content

Commit 646a207

Browse files
committed
Added test
1 parent 2493b56 commit 646a207

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: internal/integrationtest/lib/lib_test.go

+12
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,18 @@ func TestInstall(t *testing.T) {
541541
_, stderr, err := cli.Run("lib", "install", "[email protected]")
542542
require.Error(t, err)
543543
require.Contains(t, string(stderr), "No valid dependencies solution found: dependency 'MD_MAX72xx' is not available")
544+
545+
// Test installing a library with a "relaxed" version
546+
// https://github.com/arduino/arduino-cli/issues/1727
547+
_, _, err = cli.Run("lib", "install", "[email protected]")
548+
require.NoError(t, err)
549+
stdout, _, err := cli.Run("lib", "list", "--format", "json")
550+
require.NoError(t, err)
551+
requirejson.Parse(t, stdout).Query(`.[] | select(.library.name == "ILI9341_t3") | .library.version`).MustEqual(`"1.0"`)
552+
_, _, err = cli.Run("lib", "install", "ILI9341_t3@1")
553+
require.NoError(t, err)
554+
_, _, err = cli.Run("lib", "install", "[email protected]")
555+
require.NoError(t, err)
544556
}
545557

546558
func TestInstallLibraryWithDependencies(t *testing.T) {

0 commit comments

Comments
 (0)