17 lines
332 B
Python
17 lines
332 B
Python
def validate(str):
|
|
for char in str:
|
|
if REPLACE ME:
|
|
raise ValueError("Crime detected!")
|
|
|
|
try:
|
|
validate("abcdefg")
|
|
print("✅ test1 pass!")
|
|
except:
|
|
print("❌ test1 pass!")
|
|
|
|
try:
|
|
validate("abcdefg\rhijklmnop")
|
|
print("❌ test2 fail!")
|
|
except ValueError as err:
|
|
print("✅ test2 pass!")
|