def test_safe_mode_neg(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2014 raw_input("How old is the earth?>> ") """ #missing end function statement TestEzhilException.create_and_test_spl_safe_mode( exprCode, RuntimeException, "may not be used in SAFE MODE")
def test_getenv_OS_module_fcn(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2013 getenv("SHELL") #not avaiable in safe mode """ #missing end function statement TestEzhilException.create_and_test_spl_safe_mode( exprCode, RuntimeException, "getenv")
def test_globals_deleted_fcn(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2013 globals() #not avaiable in safe mode """ #missing end function statement TestEzhilException.create_and_test_spl_safe_mode( exprCode, RuntimeException, "globals")
def test_system_OS_function(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2014 system("ls -lrt") system("cat /etc/passwd") """ #missing end function statement TestEzhilException.create_and_test_spl_safe_mode(exprCode,RuntimeException,"system")
def test_system_OS_function(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2014 system("ls -lrt") system("cat /etc/passwd") """ #missing end function statement TestEzhilException.create_and_test_spl_safe_mode( exprCode, RuntimeException, "system")
def test_dupe_fcns(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2013 நிரல்பாகம் fact ( n ) @( n == 0 ) ஆனால் பின்கொடு 1 இல்லை பின்கொடு n*fact( n - 1 ) முடி முடி நிரல்பாகம் fact ( n ) @( n == 0 ) ஆனால் பின்கொடு 1 இல்லை பின்கொடு n*fact( n - 1 ) முடி முடி பதிப்பி fact(5) """ #we raise exception on duplicate fcns TestEzhilException.create_and_test_spl_safe_mode(exprCode,Exception,"multiply defined")
def test_dupe_fcns(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2013 நிரல்பாகம் fact ( n ) @( n == 0 ) ஆனால் பின்கொடு 1 இல்லை பின்கொடு n*fact( n - 1 ) முடி முடி நிரல்பாகம் fact ( n ) @( n == 0 ) ஆனால் பின்கொடு 1 இல்லை பின்கொடு n*fact( n - 1 ) முடி முடி பதிப்பி fact(5) """ #we raise exception on duplicate fcns TestEzhilException.create_and_test_spl_safe_mode( exprCode, Exception, "multiply defined")
def test_safe_mode_neg(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2014 raw_input("How old is the earth?>> ") """ #missing end function statement TestEzhilException.create_and_test_spl_safe_mode(exprCode,RuntimeException,"may not be used in SAFE MODE")
def test_globals_deleted_fcn(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2013 globals() #not avaiable in safe mode """ #missing end function statement TestEzhilException.create_and_test_spl_safe_mode(exprCode,RuntimeException,"globals")
def test_getenv_OS_module_fcn(self): exprCode = u""" # (C) முத்தையா அண்ணாமலை 2013 getenv("SHELL") #not avaiable in safe mode """ #missing end function statement TestEzhilException.create_and_test_spl_safe_mode(exprCode,RuntimeException,"getenv")