Add a few tests to cover other folder names (#10356)
Added additional tests to cover other folder names in regards to [#10193](https://github.com/zed-industries/zed/issues/10193) and [#9729](https://github.com/zed-industries/zed/issues/9729). I had a similar issue but with folder names like '2.5' and '2.5_backup'. I didn't see test coverage for those kinds of file names, so wanted to add them.  Release Notes: - N/A Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
fd3ee5a9d0
commit
b0eda77d73
1 changed files with 24 additions and 0 deletions
|
@ -641,6 +641,30 @@ mod tests {
|
||||||
NumericPrefixWithSuffix::from_numeric_prefixed_str(target),
|
NumericPrefixWithSuffix::from_numeric_prefixed_str(target),
|
||||||
Some(NumericPrefixWithSuffix(1, "_2ab"))
|
Some(NumericPrefixWithSuffix(1, "_2ab"))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let target = "1.2";
|
||||||
|
assert_eq!(
|
||||||
|
NumericPrefixWithSuffix::from_numeric_prefixed_str(target),
|
||||||
|
Some(NumericPrefixWithSuffix(1, ".2"))
|
||||||
|
);
|
||||||
|
|
||||||
|
let target = "1.2_a";
|
||||||
|
assert_eq!(
|
||||||
|
NumericPrefixWithSuffix::from_numeric_prefixed_str(target),
|
||||||
|
Some(NumericPrefixWithSuffix(1, ".2_a"))
|
||||||
|
);
|
||||||
|
|
||||||
|
let target = "12.2_a";
|
||||||
|
assert_eq!(
|
||||||
|
NumericPrefixWithSuffix::from_numeric_prefixed_str(target),
|
||||||
|
Some(NumericPrefixWithSuffix(12, ".2_a"))
|
||||||
|
);
|
||||||
|
|
||||||
|
let target = "12a.2_a";
|
||||||
|
assert_eq!(
|
||||||
|
NumericPrefixWithSuffix::from_numeric_prefixed_str(target),
|
||||||
|
Some(NumericPrefixWithSuffix(12, "a.2_a"))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue