Skip to content

Commit

Permalink
add test for unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Nov 25, 2024
1 parent 6143657 commit 90d523b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/t00-simple.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
echo file > $out/dir/file
ln -s /etc/passwd $out/forbidden-symlink
ln -s $out/dir/file $out/allowed-symlink
# check unicode
echo test > "$out/🦄"
'';
in
{
Expand Down Expand Up @@ -56,6 +59,9 @@
assert data["root"]["entries"]["bin"]["type"] == "directory", "expect bin directory in listing"
client01.succeed("${pkgs.hello}/bin/hello")
# test unicode
client01.succeed("nix copy --from http://harmonia:5000/ ${testServe}")
print("download ${testServe}")
out = client01.wait_until_succeeds("curl -v http://harmonia:5000/serve/${hashPart testServe}/")
print(out)
Expand All @@ -68,6 +74,10 @@
out = client01.wait_until_succeeds("curl -v http://harmonia:5000/serve/${hashPart testServe}/dir/file").strip()
print(out)
assert "file" == out, f"expected 'file', got '{out}'"
out = client01.wait_until_succeeds("curl -v http://harmonia:5000/serve/${hashPart testServe}/🦄").strip()
print(out)
assert "test" == out, f"expected 'test', got '{out}'"
'';
}
)

0 comments on commit 90d523b

Please sign in to comment.