Commit 37c91434 by sikang

update

parent 89b54bcf
......@@ -20,7 +20,7 @@ def gen_rand_str():
def get_rand_code():
num = random.randint(0, 5);
num = random.randint(0, 4);
code = ";\n//-------"+str(num)+"-------\n"
if num == 0:
code += "String " + gen_rand_str() + "=\"" + gen_rand_str() + "\";\n"
......@@ -50,6 +50,7 @@ def process_file_content(path, file_name):
with open(path, "w", encoding="utf-8") as f_w:
for line in lines:
if ";\n" in line and "return" not in line and "break" not in line and "continue" not in line and "import" not in line and "package" not in line:
if random.randint(0, 20) % 2 == 0:
line = line.replace(";\n", get_rand_code())
f_w.write(line)
print("done\n")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment