Skip to content

Commit

Permalink
Refine test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jondy committed Jun 25, 2020
1 parent 63d1ae6 commit 687e11c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/function-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,8 @@ dist=dist-super-mode-6

cat <<EOF > sufoo2.py
# Test auto patch
import threading
from time import sleep
def foo(n):
'''This is a test function'''
Expand Down Expand Up @@ -579,8 +581,8 @@ def foo(n):
if n > 3:
print('n is %s' % n)
foo(2)
foo(3)
for i in range(3):
threading.Thread(target=foo, args=(i,)).start()
EOF

$PYARMOR obfuscate --exact --advanced 2 -O $dist sufoo2.py >result.log 2>&1
Expand All @@ -589,8 +591,9 @@ check_return_value
(cd $dist; $PYTHON sufoo2.py >result.log 2>&1)
check_return_value
check_file_content $dist/result.log "Super Mode: 2"
check_file_content $dist/result.log "n is 26"
check_file_content $dist/result.log "n is 27"
check_file_content $dist/result.log "n is 28"
check_file_content $dist/result.log "n is 29"

csih_inform "S-7. Test super mode with clean_str"
dist=dist-super-mode-7
Expand Down

0 comments on commit 687e11c

Please sign in to comment.