summaryrefslogtreecommitdiffstats
path: root/tests/archinfo
diff options
context:
space:
mode:
Diffstat (limited to 'tests/archinfo')
-rw-r--r--tests/archinfo22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/archinfo b/tests/archinfo
new file mode 100644
index 0000000..5034766
--- /dev/null
+++ b/tests/archinfo
@@ -0,0 +1,22 @@
+# -*- sh -*-
+# See LICENSE file for copyright and license details.
+
+printf '%s\n' "$archinfo" | grep '^AMD64 8 64 64 Little TWOS_COMPLEMENT' >/dev/null
+printf '%s\n' "$archinfo" | grep '^AMD64_X32 8 32 32 Little TWOS_COMPLEMENT' >/dev/null
+printf '%s\n' "$archinfo" | grep '^M68K 8 32 32 Big TWOS_COMPLEMENT' >/dev/null
+printf '%s\n' "$archinfo" | grep '^PARISC_32 8 32 32 Big TWOS_COMPLEMENT' >/dev/null
+printf '%s\n' "$archinfo" | grep '^PARISC_64 8 64 64 Big TWOS_COMPLEMENT' >/dev/null
+printf '%s\n' "$archinfo" | grep '^SPARC_32 8 32 32 Big TWOS_COMPLEMENT' >/dev/null
+printf '%s\n' "$archinfo" | grep '^I386 8 32 32 Little TWOS_COMPLEMENT' >/dev/null
+test $(getbytesize AMD64) = 8
+test $(getbytesize I386) = 8
+test $(getaddrsize I386) = 32
+test $(getaddrsize AMD64) = 64
+test $(getsizesize AMD64) = 64
+test $(getsizesize I386) = 32
+test $(getendian I386) = Little
+test $(getendian AMD64) = Little
+test $(getendian M68K) = Big
+test $(getsign I386) = TWOS_COMPLEMENT
+test $(getsign AMD64) = TWOS_COMPLEMENT
+test $(getsign M68K) = TWOS_COMPLEMENT