aboutsummaryrefslogtreecommitdiff
path: root/tests/unistd/swab.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unistd/swab.c')
-rw-r--r--tests/unistd/swab.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unistd/swab.c b/tests/unistd/swab.c
new file mode 100644
index 00000000..d5c9ec27
--- /dev/null
+++ b/tests/unistd/swab.c
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include <unistd.h>
+
+int main() {
+ char src[] = "abcdefg";
+ char dst[10] = {0};
+ swab(src, dst, 5);
+
+ printf("before: %s\n", src);
+ printf("after: %s\n", dst);
+
+ return 0;
+}