]> granicus.if.org Git - php/commitdiff
added a regression test skeleton file
authorHartmut Holzgraefe <hholzgra@php.net>
Mon, 23 Oct 2000 07:31:31 +0000 (07:31 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Mon, 23 Oct 2000 07:31:31 +0000 (07:31 +0000)
 plus a partintro in xml documentation template

ext/ext_skel
ext/skeleton/create_stubs
ext/skeleton/tests/001.phpt [new file with mode: 0644]

index 12fe17bd32b482affc0bc88d937f1dc5e7314bf2..207fbd2fa0c8363a5274ac8edc0a12a19901bbee 100755 (executable)
@@ -200,7 +200,10 @@ if [ ! -z $no_help ]; then
 fi
 sed -f sedscript <../skeleton/php_skeleton.h > php_$extname.h
 
-rm sedscript
+$ECHO_N " tests/001.phpt$ECHO_C"
+mkdir tests || givup "Cannot create tests directory"
+chmod 755 tests
+sed -f sedscript <../skeleton/tests/001.phpt > tests/001.phpt
 
 if test -z "$stubs" && test -z "$no_help"; then
   $ECHO_N " $extname.php$ECHO_C"
@@ -210,6 +213,8 @@ if test -z "$stubs" && test -z "$no_help"; then
     > $extname.php
 fi
 
+rm sedscript
+
 if test -n "$proto"; then
   if test -z "$stubs"; then
     rm function_entries
@@ -226,7 +231,8 @@ in the instructions above.
   fi
 fi
 
-chmod 644 *
+find . -type f | xargs chmod 644 
+find . -type d | xargs chmod 755
 fi
 
 echo " [done]."
index e7ea6a165b1de77751bf5ec5217b2b7fcf66599e..e302fe31be872f85017c7138e6a454ad193b1f87 100755 (executable)
@@ -85,7 +85,11 @@ BEGIN {
 
        xmlhead = " <reference id=\"ref." extname "\">\n" \
                "  <title> functions</title>\n" \
-               "  <titleabbrev></titleabbrev>\n\n"
+               "  <titleabbrev></titleabbrev>\n\n" \
+               "  <partintro>\n" 
+    "   <para>\n" \
+    "   </para\n" \
+    "  </partintro>\n\n";
 
        xmlfoot = " </reference>\n\n" \
                "<!-- Keep this comment at the end of the file\n" \
diff --git a/ext/skeleton/tests/001.phpt b/ext/skeleton/tests/001.phpt
new file mode 100644 (file)
index 0000000..cf40e4e
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Check for extname presence
+--SKIPIF--
+<?php if (!extension_loaded("extname")) print "skip"; ?>
+--POST--
+--GET--
+--FILE--
+<?php 
+echo "extname extension is available";
+/*
+       you can add regression tests for your extension here
+
+  the output of your test code has to be equal to the
+  text in the --EXPECT-- section below for the tests
+  to pass, differences between the output and the
+  expected text are interpreted as failure
+
+       see php4/tests/README for further information on
+  writing regression tests
+*/
+?>
+--EXPECT--
+extname extension is available
\ No newline at end of file