From c7d2d62a02c6f0d47c31f72f36ceb24eed6817af Mon Sep 17 00:00:00 2001 From: Raghubansh Kumar Date: Sun, 12 Aug 2007 05:14:13 +0000 Subject: [PATCH] More new testcases for fopen() & fclose() functions --- ext/standard/tests/file/007_variation1.phpt | 68 +++++++++++++ ext/standard/tests/file/007_variation10.phpt | 72 ++++++++++++++ .../tests/file/007_variation11-win32.phpt | 91 ++++++++++++++++++ ext/standard/tests/file/007_variation11.phpt | 91 ++++++++++++++++++ .../tests/file/007_variation12-win32.phpt | 95 +++++++++++++++++++ ext/standard/tests/file/007_variation12.phpt | 95 +++++++++++++++++++ .../tests/file/007_variation13-win32.phpt | 77 +++++++++++++++ ext/standard/tests/file/007_variation13.phpt | 77 +++++++++++++++ ext/standard/tests/file/007_variation14.phpt | 77 +++++++++++++++ ext/standard/tests/file/007_variation15.phpt | 74 +++++++++++++++ ext/standard/tests/file/007_variation16.phpt | 76 +++++++++++++++ ext/standard/tests/file/007_variation17.phpt | 68 +++++++++++++ ext/standard/tests/file/007_variation18.phpt | 74 +++++++++++++++ ext/standard/tests/file/007_variation19.phpt | 88 +++++++++++++++++ ext/standard/tests/file/007_variation2.phpt | 74 +++++++++++++++ ext/standard/tests/file/007_variation20.phpt | 92 ++++++++++++++++++ ext/standard/tests/file/007_variation21.phpt | 74 +++++++++++++++ ext/standard/tests/file/007_variation22.phpt | 79 +++++++++++++++ ext/standard/tests/file/007_variation23.phpt | 74 +++++++++++++++ ext/standard/tests/file/007_variation24.phpt | 78 +++++++++++++++ ext/standard/tests/file/007_variation3.phpt | 88 +++++++++++++++++ ext/standard/tests/file/007_variation4.phpt | 92 ++++++++++++++++++ ext/standard/tests/file/007_variation5.phpt | 74 +++++++++++++++ ext/standard/tests/file/007_variation6.phpt | 79 +++++++++++++++ ext/standard/tests/file/007_variation7.phpt | 74 +++++++++++++++ ext/standard/tests/file/007_variation8.phpt | 78 +++++++++++++++ ext/standard/tests/file/007_variation9.phpt | 68 +++++++++++++ 27 files changed, 2147 insertions(+) create mode 100644 ext/standard/tests/file/007_variation1.phpt create mode 100644 ext/standard/tests/file/007_variation10.phpt create mode 100644 ext/standard/tests/file/007_variation11-win32.phpt create mode 100644 ext/standard/tests/file/007_variation11.phpt create mode 100644 ext/standard/tests/file/007_variation12-win32.phpt create mode 100644 ext/standard/tests/file/007_variation12.phpt create mode 100644 ext/standard/tests/file/007_variation13-win32.phpt create mode 100644 ext/standard/tests/file/007_variation13.phpt create mode 100644 ext/standard/tests/file/007_variation14.phpt create mode 100644 ext/standard/tests/file/007_variation15.phpt create mode 100644 ext/standard/tests/file/007_variation16.phpt create mode 100644 ext/standard/tests/file/007_variation17.phpt create mode 100644 ext/standard/tests/file/007_variation18.phpt create mode 100644 ext/standard/tests/file/007_variation19.phpt create mode 100644 ext/standard/tests/file/007_variation2.phpt create mode 100644 ext/standard/tests/file/007_variation20.phpt create mode 100644 ext/standard/tests/file/007_variation21.phpt create mode 100644 ext/standard/tests/file/007_variation22.phpt create mode 100644 ext/standard/tests/file/007_variation23.phpt create mode 100644 ext/standard/tests/file/007_variation24.phpt create mode 100644 ext/standard/tests/file/007_variation3.phpt create mode 100644 ext/standard/tests/file/007_variation4.phpt create mode 100644 ext/standard/tests/file/007_variation5.phpt create mode 100644 ext/standard/tests/file/007_variation6.phpt create mode 100644 ext/standard/tests/file/007_variation7.phpt create mode 100644 ext/standard/tests/file/007_variation8.phpt create mode 100644 ext/standard/tests/file/007_variation9.phpt diff --git a/ext/standard/tests/file/007_variation1.phpt b/ext/standard/tests/file/007_variation1.phpt new file mode 100644 index 0000000000..6796994bbd --- /dev/null +++ b/ext/standard/tests/file/007_variation1.phpt @@ -0,0 +1,68 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "r" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'r' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(0) +bool(true) +string(7) "Unknown" +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'r' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +string(20) "line +line of text +li" + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(0) +bool(true) +unicode(7) "Unknown" +*** Done *** diff --git a/ext/standard/tests/file/007_variation10.phpt b/ext/standard/tests/file/007_variation10.phpt new file mode 100644 index 0000000000..22b132e3ba --- /dev/null +++ b/ext/standard/tests/file/007_variation10.phpt @@ -0,0 +1,72 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "r+t" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'r+t' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(20) +int(37) +int(57) +bool(true) +string(7) "Unknown" +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'r+t' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +unicode(20) "line +line of text +li" +int(20) +int(37) +int(57) +bool(true) +unicode(7) "Unknown" +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/file/007_variation11-win32.phpt b/ext/standard/tests/file/007_variation11-win32.phpt new file mode 100644 index 0000000000..6e56760f5c --- /dev/null +++ b/ext/standard/tests/file/007_variation11-win32.phpt @@ -0,0 +1,91 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "wt" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'wt' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" +int(39) +int(0) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'wt' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +int(37) +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" +int(39) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation11.phpt b/ext/standard/tests/file/007_variation11.phpt new file mode 100644 index 0000000000..e6be30e95c --- /dev/null +++ b/ext/standard/tests/file/007_variation11.phpt @@ -0,0 +1,91 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "wt" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'wt' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'wt' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +int(37) +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation12-win32.phpt b/ext/standard/tests/file/007_variation12-win32.phpt new file mode 100644 index 0000000000..beadfd9819 --- /dev/null +++ b/ext/standard/tests/file/007_variation12-win32.phpt @@ -0,0 +1,95 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w+t" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w+t' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" +int(39) +int(0) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'w+t' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +int(37) +int(37) +unicode(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +unicode(7) "Unknown" +int(39) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation12.phpt b/ext/standard/tests/file/007_variation12.phpt new file mode 100644 index 0000000000..00163d2aca --- /dev/null +++ b/ext/standard/tests/file/007_variation12.phpt @@ -0,0 +1,95 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w+t" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w+t' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'w+t' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +int(37) +int(37) +unicode(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +unicode(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation13-win32.phpt b/ext/standard/tests/file/007_variation13-win32.phpt new file mode 100644 index 0000000000..3d764bc136 --- /dev/null +++ b/ext/standard/tests/file/007_variation13-win32.phpt @@ -0,0 +1,77 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "at" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'at' mode *** +resource(8) of type (stream) +string(6) "stream" +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" +int(59) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'at' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" +int(59) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation13.phpt b/ext/standard/tests/file/007_variation13.phpt new file mode 100644 index 0000000000..ddb4555963 --- /dev/null +++ b/ext/standard/tests/file/007_variation13.phpt @@ -0,0 +1,77 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "at" mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'at' mode *** +resource(8) of type (stream) +string(6) "stream" +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" +int(57) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'at' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" +int(57) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation14.phpt b/ext/standard/tests/file/007_variation14.phpt new file mode 100644 index 0000000000..c12593a84a --- /dev/null +++ b/ext/standard/tests/file/007_variation14.phpt @@ -0,0 +1,77 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "a+t" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'a+t' mode *** +resource(8) of type (stream) +string(6) "stream" +int(37) +string(57) "line +line of text +liabcdefghij +mnopqrst uvwxyz +0123456789" +int(57) +bool(true) +string(7) "Unknown" +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'a+t' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(37) +unicode(57) "line +line of text +liabcdefghij +mnopqrst uvwxyz +0123456789" +int(57) +bool(true) +unicode(7) "Unknown" +bool(true) +*** Done *** \ No newline at end of file diff --git a/ext/standard/tests/file/007_variation15.phpt b/ext/standard/tests/file/007_variation15.phpt new file mode 100644 index 0000000000..9f3ae6b180 --- /dev/null +++ b/ext/standard/tests/file/007_variation15.phpt @@ -0,0 +1,74 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "xt" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'xt' mode *** +resource(5) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'xt' mode *** +resource(5) of type (stream) +unicode(6) "stream" +int(0) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/007_variation16.phpt b/ext/standard/tests/file/007_variation16.phpt new file mode 100644 index 0000000000..6f50293254 --- /dev/null +++ b/ext/standard/tests/file/007_variation16.phpt @@ -0,0 +1,76 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "x+t" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'x+t' mode *** +resource(5) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'x+t' mode *** +resource(5) of type (stream) +unicode(6) "stream" +int(0) +int(37) +int(37) +unicode(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +unicode(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/007_variation17.phpt b/ext/standard/tests/file/007_variation17.phpt new file mode 100644 index 0000000000..63b60cf683 --- /dev/null +++ b/ext/standard/tests/file/007_variation17.phpt @@ -0,0 +1,68 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "rb" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'rb' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(0) +bool(true) +string(7) "Unknown" +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'rb' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +string(20) "line +line of text +li" + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(0) +bool(true) +unicode(7) "Unknown" +*** Done *** diff --git a/ext/standard/tests/file/007_variation18.phpt b/ext/standard/tests/file/007_variation18.phpt new file mode 100644 index 0000000000..277195c190 --- /dev/null +++ b/ext/standard/tests/file/007_variation18.phpt @@ -0,0 +1,74 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "r+b" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'r+b' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(20) +int(37) +int(57) +bool(true) +string(7) "Unknown" +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'r+b' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +string(20) "line +line of text +li" +int(20) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(57) +bool(true) +unicode(7) "Unknown" +*** Done *** diff --git a/ext/standard/tests/file/007_variation19.phpt b/ext/standard/tests/file/007_variation19.phpt new file mode 100644 index 0000000000..594c3e25b2 --- /dev/null +++ b/ext/standard/tests/file/007_variation19.phpt @@ -0,0 +1,88 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "wb" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'wb' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'wb' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation2.phpt b/ext/standard/tests/file/007_variation2.phpt new file mode 100644 index 0000000000..b2ef137cda --- /dev/null +++ b/ext/standard/tests/file/007_variation2.phpt @@ -0,0 +1,74 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "r+" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'r+' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(20) +int(37) +int(57) +bool(true) +string(7) "Unknown" +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'r+' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +string(20) "line +line of text +li" +int(20) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(57) +bool(true) +unicode(7) "Unknown" +*** Done *** diff --git a/ext/standard/tests/file/007_variation20.phpt b/ext/standard/tests/file/007_variation20.phpt new file mode 100644 index 0000000000..ed4cf10f6d --- /dev/null +++ b/ext/standard/tests/file/007_variation20.phpt @@ -0,0 +1,92 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w+b" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w+b' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'w+b' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +unicode(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation21.phpt b/ext/standard/tests/file/007_variation21.phpt new file mode 100644 index 0000000000..4a2fbb5d9c --- /dev/null +++ b/ext/standard/tests/file/007_variation21.phpt @@ -0,0 +1,74 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "ab" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'ab' mode *** +resource(8) of type (stream) +string(6) "stream" +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" +int(57) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'ab' mode *** +resource(8) of type (stream) +unicode(6) "stream" + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" +int(57) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation22.phpt b/ext/standard/tests/file/007_variation22.phpt new file mode 100644 index 0000000000..28af71b2e1 --- /dev/null +++ b/ext/standard/tests/file/007_variation22.phpt @@ -0,0 +1,79 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "a+b" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'a+b' mode *** +resource(8) of type (stream) +string(6) "stream" +int(37) +string(57) "line +line of text +liabcdefghij +mnopqrst uvwxyz +0123456789" +int(57) +bool(true) +string(7) "Unknown" +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'a+b' mode *** +resource(8) of type (stream) +unicode(6) "stream" + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +string(57) "line +line of text +liabcdefghij +mnopqrst uvwxyz +0123456789" +int(57) +bool(true) +unicode(7) "Unknown" +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation23.phpt b/ext/standard/tests/file/007_variation23.phpt new file mode 100644 index 0000000000..e84a496a2e --- /dev/null +++ b/ext/standard/tests/file/007_variation23.phpt @@ -0,0 +1,74 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "xb" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'xb' mode *** +resource(5) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'xb' mode *** +resource(5) of type (stream) +unicode(6) "stream" +int(0) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/007_variation24.phpt b/ext/standard/tests/file/007_variation24.phpt new file mode 100644 index 0000000000..fa8706e573 --- /dev/null +++ b/ext/standard/tests/file/007_variation24.phpt @@ -0,0 +1,78 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "x+b" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'x+b' mode *** +resource(5) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'x+b' mode *** +resource(5) of type (stream) +unicode(6) "stream" +int(0) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +unicode(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/007_variation3.phpt b/ext/standard/tests/file/007_variation3.phpt new file mode 100644 index 0000000000..c209e06c36 --- /dev/null +++ b/ext/standard/tests/file/007_variation3.phpt @@ -0,0 +1,88 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'w' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation4.phpt b/ext/standard/tests/file/007_variation4.phpt new file mode 100644 index 0000000000..1837a9c15b --- /dev/null +++ b/ext/standard/tests/file/007_variation4.phpt @@ -0,0 +1,92 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "w+" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'w+' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'w+' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +unicode(7) "Unknown" +int(37) +int(0) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation5.phpt b/ext/standard/tests/file/007_variation5.phpt new file mode 100644 index 0000000000..2bc28b0e90 --- /dev/null +++ b/ext/standard/tests/file/007_variation5.phpt @@ -0,0 +1,74 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "a" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'a' mode *** +resource(8) of type (stream) +string(6) "stream" +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" +int(57) +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'a' mode *** +resource(8) of type (stream) +unicode(6) "stream" + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" +int(57) +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation6.phpt b/ext/standard/tests/file/007_variation6.phpt new file mode 100644 index 0000000000..48e93e2aeb --- /dev/null +++ b/ext/standard/tests/file/007_variation6.phpt @@ -0,0 +1,79 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "a+" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'a+' mode *** +resource(8) of type (stream) +string(6) "stream" +int(37) +string(57) "line +line of text +liabcdefghij +mnopqrst uvwxyz +0123456789" +int(57) +bool(true) +string(7) "Unknown" +bool(true) +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'a+' mode *** +resource(8) of type (stream) +unicode(6) "stream" + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +string(57) "line +line of text +liabcdefghij +mnopqrst uvwxyz +0123456789" +int(57) +bool(true) +unicode(7) "Unknown" +bool(true) +*** Done *** diff --git a/ext/standard/tests/file/007_variation7.phpt b/ext/standard/tests/file/007_variation7.phpt new file mode 100644 index 0000000000..ad9736d4a2 --- /dev/null +++ b/ext/standard/tests/file/007_variation7.phpt @@ -0,0 +1,74 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "x" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'x' mode *** +resource(5) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +bool(false) +int(0) +bool(true) +string(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %s +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'x' mode *** +resource(5) of type (stream) +unicode(6) "stream" +int(0) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(37) +bool(false) +int(0) +bool(true) +unicode(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/007_variation8.phpt b/ext/standard/tests/file/007_variation8.phpt new file mode 100644 index 0000000000..d0a0e93b4a --- /dev/null +++ b/ext/standard/tests/file/007_variation8.phpt @@ -0,0 +1,78 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "x+" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'x+' mode *** +resource(5) of type (stream) +string(6) "stream" +int(0) +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +string(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'x+' mode *** +resource(5) of type (stream) +unicode(6) "stream" +int(0) + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(37) +int(37) +string(37) "abcdefghij +mnopqrst uvwxyz +0123456789" +int(37) +bool(true) +unicode(7) "Unknown" + +Warning: fopen(%s): failed to open stream: File exists in %s on line %d +*** Done *** diff --git a/ext/standard/tests/file/007_variation9.phpt b/ext/standard/tests/file/007_variation9.phpt new file mode 100644 index 0000000000..e69b66625e --- /dev/null +++ b/ext/standard/tests/file/007_variation9.phpt @@ -0,0 +1,68 @@ +--TEST-- +Test fopen and fclose() functions - usage variations - "rt" mode +--FILE-- + +--EXPECTF-- +*** Test fopen() & fclose() functions: with 'rt' mode *** +resource(8) of type (stream) +string(6) "stream" +int(0) +string(20) "line +line of text +li" +int(0) +bool(true) +string(7) "Unknown" +*** Done *** +--UEXPECTF-- +*** Test fopen() & fclose() functions: with 'rt' mode *** +resource(8) of type (stream) +unicode(6) "stream" +int(0) +unicode(20) "line +line of text +li" + +Notice: fwrite(): 37 character unicode buffer downcoded for binary stream runtime_encoding in %s on line %d +int(0) +bool(true) +unicode(7) "Unknown" +*** Done *** -- 2.40.0