aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/006.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/006.sh')
-rw-r--r--tests/006.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/006.sh b/tests/006.sh
new file mode 100644
index 0000000..2ae85ec
--- /dev/null
+++ b/tests/006.sh
@@ -0,0 +1,49 @@
+set -e
+
+bash ../../test_exit_code.sh 1 <<'EOF'
+int main() {
+ return 0 == 0;
+}
+EOF
+
+bash ../../test_exit_code.sh 0 <<'EOF'
+int main() {
+ return 123 != 123;
+}
+EOF
+
+bash ../../test_exit_code.sh 1 <<'EOF'
+int main() {
+ return 123 != 456;
+}
+EOF
+
+bash ../../test_exit_code.sh 0 <<'EOF'
+int main() {
+ return 123 == 124;
+}
+EOF
+
+bash ../../test_exit_code.sh 1 <<'EOF'
+int main() {
+ return 123 < 567;
+}
+EOF
+
+bash ../../test_exit_code.sh 1 <<'EOF'
+int main() {
+ return 123 <= 567;
+}
+EOF
+
+bash ../../test_exit_code.sh 1 <<'EOF'
+int main() {
+ return 123 <= 123;
+}
+EOF
+
+bash ../../test_exit_code.sh 0 <<'EOF'
+int main() {
+ return 123 < 123;
+}
+EOF