mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
added a regression test skeleton file
plus a partintro in xml documentation template
This commit is contained in:
parent
fa8452bbb2
commit
b17451635d
3 changed files with 36 additions and 3 deletions
10
ext/ext_skel
10
ext/ext_skel
|
@ -200,7 +200,10 @@ if [ ! -z $no_help ]; then
|
||||||
fi
|
fi
|
||||||
sed -f sedscript <../skeleton/php_skeleton.h > php_$extname.h
|
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
|
if test -z "$stubs" && test -z "$no_help"; then
|
||||||
$ECHO_N " $extname.php$ECHO_C"
|
$ECHO_N " $extname.php$ECHO_C"
|
||||||
|
@ -210,6 +213,8 @@ if test -z "$stubs" && test -z "$no_help"; then
|
||||||
> $extname.php
|
> $extname.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm sedscript
|
||||||
|
|
||||||
if test -n "$proto"; then
|
if test -n "$proto"; then
|
||||||
if test -z "$stubs"; then
|
if test -z "$stubs"; then
|
||||||
rm function_entries
|
rm function_entries
|
||||||
|
@ -226,7 +231,8 @@ in the instructions above.
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 644 *
|
find . -type f | xargs chmod 644
|
||||||
|
find . -type d | xargs chmod 755
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " [done]."
|
echo " [done]."
|
||||||
|
|
|
@ -85,7 +85,11 @@ BEGIN {
|
||||||
|
|
||||||
xmlhead = " <reference id=\"ref." extname "\">\n" \
|
xmlhead = " <reference id=\"ref." extname "\">\n" \
|
||||||
" <title> functions</title>\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" \
|
xmlfoot = " </reference>\n\n" \
|
||||||
"<!-- Keep this comment at the end of the file\n" \
|
"<!-- Keep this comment at the end of the file\n" \
|
||||||
|
|
23
ext/skeleton/tests/001.phpt
Normal file
23
ext/skeleton/tests/001.phpt
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue