flush
[m6w6/ext-psi] / tests / idn / idn002.phpt
diff --git a/tests/idn/idn002.phpt b/tests/idn/idn002.phpt
new file mode 100644 (file)
index 0000000..9f092b1
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+libidn
+--INI--
+psi.directory={PWD}
+--SKIPIF--
+<?php
+extension_loaded("psi") or die("skip - need ext/psi");
+?>
+--FILE--
+===TEST===
+<?php 
+
+$rc = idn\utf8_to_ascii("…asdf….de", $result, IDNA_USE_STD3_ASCII_RULES);
+printf("%s\n", $result);
+printf("%s\n", idn\strerror($rc));
+
+?>
+===DONE===
+--EXPECT--
+===TEST===
+
+Non-digit/letter/hyphen in input
+===DONE===
\ No newline at end of file