mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
test+docs: cover --clear-data flag in CLI parser test and reference
This commit is contained in:
1 parent
d489000f63
commit
407b4a0648
2 files changed
+18
No files matched your search
@@ -32,6 +32,23 @@ func TestParseTestArgs_Defaults(t *testing.T) {
|
||||
if options.seed != 0 {
|
||||
t.Errorf("seed default: got %d, want 0", options.seed)
|
||||
}
|
||||
if options.clearData {
|
||||
t.Errorf("clearData default: got true, want false")
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseTestArgs_ClearDataFlag(t *testing.T) {
|
||||
options, err := parseTestArgs([]string{
|
||||
"--spec", "s.ts",
|
||||
"--bundle-id", "com.example",
|
||||
"--clear-data",
|
||||
}, io.Discard)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
if !options.clearData {
|
||||
t.Errorf("expected clearData=true, got false")
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseTestArgs_AllFlags(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user