-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tesla-control: enable/disable valet mode
Adds valet mode commands to the tesla-control CLI tool. These commands were already supported in the library and HTTP proxy.
- Loading branch information
1 parent
5a61b6a
commit 55b7965
Showing
3 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package vehicle | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestValidPIN(t *testing.T) { | ||
validPINs := []string{ | ||
"0000", | ||
"0123", | ||
"4569", | ||
} | ||
invalidPINs := []string{ | ||
"", | ||
"123a", | ||
"12345", | ||
"1", | ||
"four", | ||
} | ||
for _, p := range validPINs { | ||
if !IsValidPIN(p) { | ||
t.Errorf("%s is a valid PIN", p) | ||
} | ||
} | ||
for _, p := range invalidPINs { | ||
if IsValidPIN(p) { | ||
t.Errorf("%s is not a valid PIN", p) | ||
} | ||
} | ||
} |