forked from defuse/php-encryption
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·42 lines (34 loc) · 855 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
echo "Normal"
echo "--------------------------------------------------"
php -d mbstring.func_overload=0 tests/runtime.php
if [ $? -ne 0 ]; then
echo "FAIL."
exit 1
fi
echo "--------------------------------------------------"
echo ""
echo "Multibyte"
echo "--------------------------------------------------"
php -d mbstring.func_overload=7 tests/runtime.php
if [ $? -ne 0 ]; then
echo "FAIL."
exit 1
fi
echo "--------------------------------------------------"
echo ""
if [ -z "$(php tests/empty.php)" ]; then
echo "PASS: Crypto.php output is empty."
else
echo "FAIL: Crypto.php output is not empty."
exit 1
fi
echo "--------------------------------------------------"
echo ""
php tests/encode.php
if [ $? -ne 0 ]; then
echo "FAIL."
exit 1
else
echo "PASS: Hex encoding is working correctly"
fi