add test case for ingesting as bytes with type hole

This commit is contained in:
Brendan Hansknecht 2023-04-09 09:18:25 -07:00
parent 165ffcf38d
commit df9f5a946e
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
3 changed files with 33 additions and 0 deletions

View file

@ -895,6 +895,23 @@ main =
)
}
#[test]
#[serial(cli_platform)]
#[cfg_attr(windows, ignore)]
fn ingested_file_bytes() {
test_roc_app(
"examples/cli",
"ingested-file-bytes.roc",
"ingested-file-bytes",
&[],
&[],
&[],
"22424\n",
UseValgrind::No,
TestCliCommands::Run,
)
}
#[test]
#[serial(parser_package)]
#[serial(zig_platform)]

View file

@ -8,4 +8,5 @@ http-get
file-io
env
ingested-file
ingested-file-bytes
out.txt

View file

@ -0,0 +1,15 @@
app "ingested-file-bytes"
packages { pf: "cli-platform/main.roc" }
imports [
pf.Stdout,
"ingested-file.roc" as ownCode : _, # A type hole can also be used here.
]
provides [main] to pf
main =
# Due to how ownCode is used, it will be a List U8.
ownCode
|> List.map Num.toNat
|> List.sum
|> Num.toStr
|> Stdout.line