mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
add basic_cli parsing based refcount test
This commit is contained in:
parent
507d339691
commit
1f5f0956b7
1 changed files with 29 additions and 0 deletions
|
@ -828,3 +828,32 @@ fn reset_reuse_alignment_8() {
|
|||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
fn basic_cli_parser() {
|
||||
assert_refcounts!(
|
||||
indoc!(
|
||||
r#"
|
||||
in =
|
||||
"d"
|
||||
|> Str.toUtf8
|
||||
|> List.keepOks \c -> Str.fromUtf8 [c]
|
||||
|
||||
out =
|
||||
when in is
|
||||
[alone] -> [alone]
|
||||
other -> other
|
||||
|
||||
List.len out
|
||||
"#
|
||||
),
|
||||
i64,
|
||||
&[
|
||||
(StandardRC, Deallocated), // str
|
||||
(StandardRC, Deallocated), // [c]
|
||||
(AfterSize, Deallocated), // in
|
||||
(AfterSize, Deallocated), // out
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue