From 687e11cf00754b667d08a661553cc50743f5a1a6 Mon Sep 17 00:00:00 2001 From: Jondy Zhao Date: Thu, 25 Jun 2020 12:46:08 +0800 Subject: [PATCH] Refine test case --- tests/function-test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/function-test.sh b/tests/function-test.sh index 84e6fb48..637d9011 100755 --- a/tests/function-test.sh +++ b/tests/function-test.sh @@ -543,6 +543,8 @@ dist=dist-super-mode-6 cat < sufoo2.py # Test auto patch +import threading +from time import sleep def foo(n): '''This is a test function''' @@ -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 @@ -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