From 1753181bffa33f989e13d0c815c7beaa97d3c2c5 Mon Sep 17 00:00:00 2001 From: Solene Rapenne Date: Mon, 28 Dec 2020 09:26:36 +0100 Subject: [PATCH] add IRI tests using utf8 or emojis --- tests/test.sh | 8 ++++++++ tests/var/gemini/virtualhoßt/é è.gmi | 1 + tests/var/gemini/⛴/❤️.gmi | 1 + 3 files changed, 10 insertions(+) create mode 100644 tests/var/gemini/virtualhoßt/é è.gmi create mode 100644 tests/var/gemini/⛴/❤️.gmi diff --git a/tests/test.sh b/tests/test.sh index cdf960d..9af2137 100644 --- a/tests/test.sh +++ b/tests/test.sh @@ -42,6 +42,14 @@ if ! [ $OUT = "0d36a423a4e8be813fda4022f08b3844" ] ; then echo "error" ; exit 1 OUT=$(printf "gemini://perso.pw\r\n" | ../vger -v -d var/gemini/ -l fr | tee /dev/stderr | $MD5) if ! [ $OUT = "7db981ce93fee268f29324912800f00d" ] ; then echo "error" ; exit 1 ; fi +# file from local directory using virtualhosts and IRI +OUT=$(printf "gemini://virtualhoßt/é è.gmi\r\n" | ../vger -v -d var/gemini/ | tee /dev/stderr | $MD5) +if ! [ $OUT = "bd30e2bb2dc2d7d18b5a3cb1af872c70" ] ; then echo "error" ; exit 1 ; fi + +# file from local directory using virtualhosts and IRI both with emojis +OUT=$(printf "gemini://⛴//❤️.gmi\r\n" | ../vger -v -d var/gemini/ | tee /dev/stderr | $MD5) +if ! [ $OUT = "9bed6f0c92d9c86cb46a32e845fb7161" ] ; then echo "error" ; exit 1 ; fi + # must fail only on OpenBSD ! # try to escape from unveil if [ -f /bsd ] diff --git a/tests/var/gemini/virtualhoßt/é è.gmi b/tests/var/gemini/virtualhoßt/é è.gmi new file mode 100644 index 0000000..e99ab37 --- /dev/null +++ b/tests/var/gemini/virtualhoßt/é è.gmi @@ -0,0 +1 @@ +With accents diff --git a/tests/var/gemini/⛴/❤️.gmi b/tests/var/gemini/⛴/❤️.gmi new file mode 100644 index 0000000..b8707f0 --- /dev/null +++ b/tests/var/gemini/⛴/❤️.gmi @@ -0,0 +1 @@ +love in a boat!