diff options
| author | Ever ATILANO <ever.atilano@smile.fr> | 2023-03-24 15:45:32 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-04-06 13:45:10 -0700 |
| commit | f19dac11ff4189a5c77736a08a24102a2bd3b468 (patch) | |
| tree | cebd62aa5ee00cb2c0f4ef2ffd78aa5432c42fc3 /meta-oe/recipes-extended/bitwise/files | |
| parent | 8986c108f4b7540967f91b421ee5cc0785e47c22 (diff) | |
| download | meta-openembedded-f19dac11ff4189a5c77736a08a24102a2bd3b468.tar.gz | |
meta-oe: recipes-extended: bitwise: Add ptest
Signed-off-by: Ever ATILANO <ever.atilano@smile.fr>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Reviewed-by: Frank WOLFF <frank.wolff@smile.fr>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/bitwise/files')
| -rw-r--r-- | meta-oe/recipes-extended/bitwise/files/ptest.out.expected | 13 | ||||
| -rwxr-xr-x | meta-oe/recipes-extended/bitwise/files/run-ptest | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/bitwise/files/ptest.out.expected b/meta-oe/recipes-extended/bitwise/files/ptest.out.expected new file mode 100644 index 0000000000..c5ca3e5215 --- /dev/null +++ b/meta-oe/recipes-extended/bitwise/files/ptest.out.expected | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | Unsigned decimal: 66 | ||
| 2 | Signed decimal: 66 | ||
| 3 | Hexadecimal: 0x42 | ||
| 4 | Octal: 0102 | ||
| 5 | Human: 66 | ||
| 6 | Radix64: 0/ | ||
| 7 | IPv4 (Network byte order - Big): 66.0.0.0 | ||
| 8 | IPv4 (Reverwsed byte order - Little): 0.0.0.66 | ||
| 9 | ASCII: .......B | ||
| 10 | Binary: | ||
| 11 | 0 1 0 0 0 0 1 0 | ||
| 12 | 7 - 0 | ||
| 13 | |||
diff --git a/meta-oe/recipes-extended/bitwise/files/run-ptest b/meta-oe/recipes-extended/bitwise/files/run-ptest new file mode 100755 index 0000000000..c29e1eaddc --- /dev/null +++ b/meta-oe/recipes-extended/bitwise/files/run-ptest | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Test 1: Basic bitwise operation | ||
| 4 | bitwise --no-color -w b 0x42 > test.out | ||
| 5 | |||
| 6 | # Compare expected output with actual output | ||
| 7 | |||
| 8 | if ! cmp test.out ptest.out.expected; then | ||
| 9 | echo "[FAIL] Test 1: Basic bitwise operation" | ||
| 10 | exit 1 | ||
| 11 | fi | ||
