Skip to content

Commit 9507ca2

Browse files
authored
Merge pull request #51 from oSoMoN/unit-tests-for-conflicting-output-style
Unit test to verify that conflicting output styles result in an error
2 parents c08e0b6 + c325291 commit 9507ca2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/params.rs

+11
Original file line numberDiff line numberDiff line change
@@ -502,4 +502,15 @@ mod tests {
502502
fn empty() {
503503
assert!(parse_params([].iter().cloned()).is_err());
504504
}
505+
#[test]
506+
fn conflicting_output_styles() {
507+
for (arg1, arg2) in [("-u", "-c"), ("-u", "-e"), ("-c", "-u"), ("-c", "-U42")] {
508+
assert!(parse_params(
509+
[os("diff"), os(arg1), os(arg2), os("foo"), os("bar")]
510+
.iter()
511+
.cloned()
512+
)
513+
.is_err());
514+
}
515+
}
505516
}

0 commit comments

Comments
 (0)