diff options
Diffstat (limited to 'tests/023.sh')
| -rw-r--r-- | tests/023.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/023.sh b/tests/023.sh new file mode 100644 index 0000000..86e2aa6 --- /dev/null +++ b/tests/023.sh @@ -0,0 +1,39 @@ +set -e + +cat <<'EOF' > expected +sizeof(int) = 4 +sizeof(int*) = 8 +sizeof(char) = 1 +sizeof(char*) = 8 +sizeof(long) = 8 +sizeof(long*) = 8 +sizeof(void*) = 8 +sizeof(int**) = 8 +sizeof(char**) = 8 +sizeof(long**) = 8 +sizeof(void**) = 8 +sizeof(int***) = 8 +sizeof(char***) = 8 +sizeof(long***) = 8 +sizeof(void***) = 8 +EOF +bash ../../test_diff.sh <<'EOF' +int main() { + printf("sizeof(int) = %d\n", sizeof(int)); + printf("sizeof(int*) = %d\n", sizeof(int*)); + printf("sizeof(char) = %d\n", sizeof(char)); + printf("sizeof(char*) = %d\n", sizeof(char*)); + printf("sizeof(long) = %d\n", sizeof(long)); + printf("sizeof(long*) = %d\n", sizeof(long*)); + printf("sizeof(void*) = %d\n", sizeof(void*)); + printf("sizeof(int**) = %d\n", sizeof(int**)); + printf("sizeof(char**) = %d\n", sizeof(char**)); + printf("sizeof(long**) = %d\n", sizeof(long**)); + printf("sizeof(void**) = %d\n", sizeof(void**)); + printf("sizeof(int***) = %d\n", sizeof(int***)); + printf("sizeof(char***) = %d\n", sizeof(char***)); + printf("sizeof(long***) = %d\n", sizeof(long***)); + printf("sizeof(void***) = %d\n", sizeof(void***)); + return 0; +} +EOF |
