mirror of
https://github.com/ultraworkers/claw-code.git
synced 2026-05-30 03:35:20 +08:00
test: add unit test coverage for invalid_history_count and unknown_option classifier arms
Two classifier arms had no corresponding assert_eq! in test_classify_error_kind_returns_correct_discriminants: invalid_history_count (both prefix and contains paths) and unknown_option (#790). Now 49/39 = full coverage of all classify_error_kind return values.
This commit is contained in:
parent
efb1542a39
commit
6ee67d6c61
@ -13259,6 +13259,20 @@ mod tests {
|
|||||||
),
|
),
|
||||||
"invalid_resume_argument"
|
"invalid_resume_argument"
|
||||||
);
|
);
|
||||||
|
// coverage: invalid_history_count arm
|
||||||
|
assert_eq!(
|
||||||
|
classify_error_kind("invalid_history_count: abc is not a valid count"),
|
||||||
|
"invalid_history_count"
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
classify_error_kind("something invalid count something"),
|
||||||
|
"invalid_history_count"
|
||||||
|
);
|
||||||
|
// coverage: unknown_option arm (#790)
|
||||||
|
assert_eq!(
|
||||||
|
classify_error_kind("unknown_option: unknown system-prompt option: --foo."),
|
||||||
|
"unknown_option"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user