diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-05-03 17:37:27 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-05-03 17:37:27 +0900 |
| commit | 7ed42654c3205657a86fa5e914c75a0eeb673f8e (patch) | |
| tree | 6e0c75c742b2eb9566df3052e3a1ea47c707902b /tests/010.sh | |
| parent | 374076ce1e9edce0469847c1615be21d100275cd (diff) | |
| download | P4Dcc-7ed42654c3205657a86fa5e914c75a0eeb673f8e.tar.gz P4Dcc-7ed42654c3205657a86fa5e914c75a0eeb673f8e.tar.zst P4Dcc-7ed42654c3205657a86fa5e914c75a0eeb673f8e.zip | |
if stmt
Diffstat (limited to 'tests/010.sh')
| -rw-r--r-- | tests/010.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/010.sh b/tests/010.sh new file mode 100644 index 0000000..df6601c --- /dev/null +++ b/tests/010.sh @@ -0,0 +1,21 @@ +set -e + +bash ../../test_exit_code.sh 12 <<'EOF' +int main() { + if (1) { + return 12; + } else { + return 34; + } +} +EOF + +bash ../../test_exit_code.sh 34 <<'EOF' +int main() { + if (1 + 1 != 2) { + return 12; + } else { + return 34; + } +} +EOF |
