summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/017/realpath.expected2
-rw-r--r--tests/017/realpath.tl12
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/017/realpath.expected b/tests/017/realpath.expected
new file mode 100644
index 00000000..659aa110
--- /dev/null
+++ b/tests/017/realpath.expected
@@ -0,0 +1,2 @@
+"/usr/bin"
+"/usr/bin"
diff --git a/tests/017/realpath.tl b/tests/017/realpath.tl
new file mode 100644
index 00000000..d920825f
--- /dev/null
+++ b/tests/017/realpath.tl
@@ -0,0 +1,12 @@
+(load "../common")
+
+(with-dyn-lib (libc)
+ (deffi realpath-null "realpath" str-d (str str))
+ (deffi realpath-buf "realpath" str-d (str (ptr-in-d (zarray 8192 char)))))
+
+(when (memq (os-symbol) '(:cygwin :solaris))
+ (put-string (file-get-string "tests/017/realpath.expected"))
+ (exit 0))
+
+(prinl (realpath-null "/usr/bin" nil))
+(prinl (realpath-buf "/usr/bin" (copy "")))