summaryrefslogtreecommitdiffstats
path: root/util/t/anonbox.net/got-some-valid-looking-email
diff options
context:
space:
mode:
Diffstat (limited to 'util/t/anonbox.net/got-some-valid-looking-email')
-rwxr-xr-xutil/t/anonbox.net/got-some-valid-looking-email16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/t/anonbox.net/got-some-valid-looking-email b/util/t/anonbox.net/got-some-valid-looking-email
new file mode 100755
index 00000000..4c3e7a11
--- /dev/null
+++ b/util/t/anonbox.net/got-some-valid-looking-email
@@ -0,0 +1,16 @@
+#! /bin/sh
+set -euf
+
+tempfile=`mktemp /tmp/test.XXXXXXXX`
+trap "rm -f $tempfile" EXIT INT
+
+anonbox.net >$tempfile
+. $tempfile
+
+{
+ echo $email
+} | {
+ IFS=@. read _logname subdomain domain
+
+ echo "$uri" | grep -q "^https://$domain/$subdomain/[0-9a-f]*/$"
+}