aboutsummaryrefslogtreecommitdiffstats
path: root/tests/comsub-posix.right
diff options
context:
space:
mode:
Diffstat (limited to 'tests/comsub-posix.right')
-rw-r--r--tests/comsub-posix.right16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/comsub-posix.right b/tests/comsub-posix.right
index a24f25f..ab04c52 100644
--- a/tests/comsub-posix.right
+++ b/tests/comsub-posix.right
@@ -55,3 +55,19 @@ here-doc terminated with a parenthesis
./comsub-posix1.sub: command substitution: line 2: syntax error near unexpected token `)'
./comsub-posix1.sub: command substitution: line 2: ` if x; then echo foo )'
after
+swap32_posix is a function
+swap32_posix ()
+{
+ local funcname=swap32_posix;
+ local arg;
+ for arg in "$@";
+ do
+ echo $((
+ ($arg & 4278190080) >> 24 |
+ ($arg & 16711680) >> 8 |
+ ($arg & 65280) << 8 |
+ ($arg & 255) << 24
+ ));
+ done
+}
+yes