llvm-for-llvmta/utils/lit/tests/Inputs/shtest-shell/check_args.py

15 lines
276 B
Python
Raw Normal View History

2022-04-25 10:02:23 +02:00
#!/usr/bin/env python
import argparse
import platform
parser = argparse.ArgumentParser()
parser.add_argument("--my_arg", "-a")
args = parser.parse_args()
answer = (platform.system() == "Windows" and
args.my_arg == "/dev/null" and "ERROR") or "OK"
print(answer)