aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/rust/16 internal c dependencies/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/rust/16 internal c dependencies/test.py')
-rwxr-xr-xmeson/test cases/rust/16 internal c dependencies/test.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/meson/test cases/rust/16 internal c dependencies/test.py b/meson/test cases/rust/16 internal c dependencies/test.py
new file mode 100755
index 000000000..dacec120b
--- /dev/null
+++ b/meson/test cases/rust/16 internal c dependencies/test.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+
+import argparse
+import subprocess
+import sys
+
+
+def main() -> None:
+ parser = argparse.ArgumentParser()
+ parser.add_argument('command')
+ parser.add_argument('expected')
+ args = parser.parse_args()
+
+ out = subprocess.run(args.command, stdout=subprocess.PIPE)
+ actual = out.stdout.decode().strip()
+
+ if args.expected != actual:
+ print('expected:', args.expected, file=sys.stderr)
+ print('actual: ', actual, file=sys.stderr)
+ sys.exit(1)
+ sys.exit(0)
+
+
+if __name__ == "__main__":
+ main()