gzopen_basic.phpt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --TEST--
  2. Test gzopen() function : basic functionality
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded("zlib")) {
  6. print "skip - ZLIB extension not loaded";
  7. }
  8. ?>
  9. --FILE--
  10. <?php
  11. /* Prototype : resource gzopen(string filename, string mode [, int use_include_path])
  12. * Description: Open a .gz-file and return a .gz-file pointer
  13. * Source code: ext/zlib/zlib.c
  14. * Alias to functions:
  15. */
  16. echo "*** Testing gzopen() : basic functionality ***\n";
  17. // Initialise all required variables
  18. $filename = dirname(__FILE__)."/004.txt.gz";
  19. $mode = 'r';
  20. $use_include_path = false;
  21. // Calling gzopen() with all possible arguments
  22. $h = gzopen($filename, $mode, $use_include_path);
  23. gzpassthru($h);
  24. gzclose($h);
  25. // Calling gzopen() with mandatory arguments
  26. $h = gzopen($filename, $mode);
  27. gzpassthru($h);
  28. gzclose($h);
  29. ?>
  30. ===DONE===
  31. --EXPECT--
  32. *** Testing gzopen() : basic functionality ***
  33. When you're taught through feelings
  34. Destiny flying high above
  35. all I know is that you can realize it
  36. Destiny who cares
  37. as it turns around
  38. and I know that it descends down on me
  39. When you're taught through feelings
  40. Destiny flying high above
  41. all I know is that you can realize it
  42. Destiny who cares
  43. as it turns around
  44. and I know that it descends down on me
  45. ===DONE===