From f30035ea799d022d90c9c4b178a4dca054b82e0d Mon Sep 17 00:00:00 2001 From: Josie Messa Date: Mon, 10 Mar 2008 15:24:14 +0000 Subject: [PATCH] - New tests for getcwd() function --- ext/standard/tests/dir/getcwd_basic.phpt | 39 ++++++++++++++++++++++++ ext/standard/tests/dir/getcwd_error.phpt | 37 ++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 ext/standard/tests/dir/getcwd_basic.phpt create mode 100644 ext/standard/tests/dir/getcwd_error.phpt diff --git a/ext/standard/tests/dir/getcwd_basic.phpt b/ext/standard/tests/dir/getcwd_basic.phpt new file mode 100644 index 0000000000..5a78dc7820 --- /dev/null +++ b/ext/standard/tests/dir/getcwd_basic.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test getcwd() function : basic functionality +--FILE-- + +===DONE=== +--CLEAN-- + +--EXPECTF-- +*** Testing getcwd() : basic functionality *** +string(%d) "%s" +string(%d) "%s%egetcwd_basic" +===DONE=== +--UEXPECTF-- +*** Testing getcwd() : basic functionality *** +unicode(%d) "%s" +unicode(%d) "%s%egetcwd_basic" +===DONE=== diff --git a/ext/standard/tests/dir/getcwd_error.phpt b/ext/standard/tests/dir/getcwd_error.phpt new file mode 100644 index 0000000000..c5569f6f69 --- /dev/null +++ b/ext/standard/tests/dir/getcwd_error.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test getcwd() function : error conditions - Incorrect number of arguments +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing getcwd() : error conditions *** + +-- Testing getcwd() function with one argument -- + +Warning: getcwd() expects exactly 0 parameters, 1 given in %s on line %d +NULL +===DONE=== +--UEXPECTF-- +*** Testing getcwd() : error conditions *** + +-- Testing getcwd() function with one argument -- + +Warning: getcwd() expects exactly 0 parameters, 1 given in %s on line %d +NULL +===DONE=== -- 2.40.0