mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Merge pull request #7543 from HajagosNorbert/ascii
add with_ascii_uppercased and caseless_ascii_equals to Str
This commit is contained in:
commit
cf1cfefadb
49 changed files with 1974 additions and 1674 deletions
|
@ -2431,3 +2431,27 @@ fn with_ascii_lowercased_non_zero_refcount() {
|
|||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
fn with_ascii_uppercased() {
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.with_ascii_uppercased("café")
|
||||
"#,
|
||||
RocStr::from("CAFé"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-dev", feature = "gen-wasm"))]
|
||||
fn caseless_ascii_equals() {
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.caseless_ascii_equals("CAfé", "caFé")
|
||||
"#,
|
||||
true,
|
||||
bool
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue