echo 0
///////////////////////////////////////////////////////////////
// Mother of all dpuser-tests
///////////////////////////////////////////////////////////////
// This is the test-suite which calls other unit tests sequentially.
// The unit tests are written in a way that they can also be called
// individually for debugging.
//
// When creating an own unit-test, it should follow thuis convention:
//
//     echo 0
//     result_unit = ""
//
// >> YOUR TEST HERE <<
//
//     if (strlen(result_unit) != 0) {
//        result_unit += "        in unit-test xxxFILENAMExxx!\n"
//     } else {
//        result_unit = "SUCCESS: unit-test xxxFILENAMExxx ok\n"
//     }
//     print result_unit
//



//=============================================================
// setup testsuite
result = ""
quiet = 1

//=============================================================
// testing simple builtin functionality
@test_basic.dpuser
result += result_unit

//=============================================================
// testing builtin functions
@test_functions.dpuser
result += result_unit

//=============================================================
// testing builtin procedures
@test_procedures.dpuser
result += result_unit

//=============================================================
// testing real-life scripts (kindly provided by Sascha Trippe)
// storing them
@test_scripts.dpuser
result += result_unit

//=============================================================
// testing the compile-command
@test_compile.dpuser
result += result_unit
compile "",/reset

//=============================================================
// testing real-life scripts (kindly provided by Sascha Trippe)
// compiling them
@test_compile/test_scripts_compile.dpuser
result += result_unit
compile "",/reset

//
// ADD NEW UNIT TESTS HERE !
//

//=============================================================
if (quiet == 0) {
   print ""
   print "============"
   print "TEST RESULTS"
   print "============"
   print result
}

print "*******************************************"
if (strpos(result, "FAILED") != -1) {
	print "ERROR: Not all tests were successful!"
} else {
	print "CONGRATULATIONS: All tests were successful!"
}
print "*******************************************"

echo 1
