mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
fix test_gen gen_str tests
This commit is contained in:
parent
aec3af667d
commit
81f007940c
1 changed files with 16 additions and 16 deletions
|
@ -1996,32 +1996,32 @@ fn str_drop_prefix() {
|
|||
r#"
|
||||
Str.dropPrefix "" "foo"
|
||||
"#,
|
||||
RocResult::ok(RocStr::from("")),
|
||||
RocResult<RocStr, ()>
|
||||
RocStr::from(""),
|
||||
RocStr
|
||||
);
|
||||
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.dropPrefix "bar" "foo"
|
||||
"#,
|
||||
RocResult::ok(RocStr::from("bar")),
|
||||
RocResult<RocStr, ()>
|
||||
RocStr::from("bar"),
|
||||
RocStr
|
||||
);
|
||||
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.dropPrefix "foobar" "foo"
|
||||
"#,
|
||||
RocResult::ok(RocStr::from("bar")),
|
||||
RocResult<RocStr, ()>
|
||||
RocStr::from("bar"),
|
||||
RocStr
|
||||
);
|
||||
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.dropPrefix "fooBarThisIsDefinitelyAReallyLongAndNotaShortString" "foo"
|
||||
"#,
|
||||
RocResult::ok(RocStr::from("BarThisIsDefinitelyAReallyLongAndNotaShortString")),
|
||||
RocResult<RocStr, ()>
|
||||
RocStr::from("BarThisIsDefinitelyAReallyLongAndNotaShortString"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2032,31 +2032,31 @@ fn str_drop_suffix() {
|
|||
r#"
|
||||
Str.dropSuffix "" "foo"
|
||||
"#,
|
||||
RocResult::ok(RocStr::from("")),
|
||||
RocResult<RocStr, ()>
|
||||
RocStr::from(""),
|
||||
RocStr
|
||||
);
|
||||
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.dropSuffix "bar" "foo"
|
||||
"#,
|
||||
RocResult::ok(RocStr::from("bar")),
|
||||
RocResult<RocStr, ()>
|
||||
RocStr::from("bar"),
|
||||
RocStr
|
||||
);
|
||||
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.dropSuffix "barfoo" "foo"
|
||||
"#,
|
||||
RocResult::ok(RocStr::from("bar")),
|
||||
RocResult<RocStr, ()>
|
||||
RocStr::from("bar"),
|
||||
RocStr
|
||||
);
|
||||
|
||||
assert_evals_to!(
|
||||
r#"
|
||||
Str.dropSuffix "BarThisIsDefinitelyAReallyLongAndNotaShortStringfoo" "foo"
|
||||
"#,
|
||||
RocResult::ok(RocStr::from("BarThisIsDefinitelyAReallyLongAndNotaShortString")),
|
||||
RocResult<RocStr, ()>
|
||||
RocStr::from("BarThisIsDefinitelyAReallyLongAndNotaShortString"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue