mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-28 08:26:45 +00: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:
@@ -13259,6 +13259,20 @@ mod tests {
|
||||
),
|
||||
"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]
|
||||
|
||||
Reference in New Issue
Block a user