From 209ff92e5a4390f8c1c0eaf4a121bca98a900157 Mon Sep 17 00:00:00 2001 From: riessen Date: Mon, 1 Oct 2001 21:58:32 +0000 Subject: [PATCH] unit test for the cvs backend class git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@584 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- tests/unit_test_backend_cvs.php | 89 +++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 tests/unit_test_backend_cvs.php diff --git a/tests/unit_test_backend_cvs.php b/tests/unit_test_backend_cvs.php new file mode 100644 index 000000000..983148bd9 --- /dev/null +++ b/tests/unit_test_backend_cvs.php @@ -0,0 +1,89 @@ +get_pagedata( $item ); + if ( $pageHash[CMD_VERSION] != "2" ) { + print "*** Error: [$item] version wrong (". $pageHash[CMD_VERSION] + .")\n"; + $REMOVE_DEBUG = false; + } +} +array_walk( $allPageNames, 'get_pagedata', $cvsdb ); + +// +// clean up after ourselves +// +if ( $REMOVE_DEBUG ) { + exec( "rm -fr " . $db_params[CVS_DOC_DIR], $cmdout, $retval ); + exec( "rm -fr " . $db_params[CVS_REPOSITORY], $cmdout, $retval ); + exec( "rm -f " . $db_params[CVS_DEBUG_FILE], $cmdout, $retval ); +} else { + print "It appears something went wrong, nothing being removed\n"; +} + +?> \ No newline at end of file -- 2.45.0