diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-11-13 11:26:37 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-11-13 11:26:37 +0000 |
commit | af5614178a73fc5060e4c15064cc5855681fa02d (patch) | |
tree | 38c019e0272f36948e207e7206c556f8f06b3a0c /test | |
parent | 3157b60d734d1aa66f8c3605df6ee5955539d999 (diff) |
Add bitwise logical operators to ${eval:
Diffstat (limited to 'test')
-rw-r--r-- | test/scripts/0000-Basic/0002 | 14 | ||||
-rw-r--r-- | test/stdout/0002 | 20 |
2 files changed, 31 insertions, 3 deletions
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index c9757718b..760ffb358 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -67,6 +67,20 @@ eval: ${eval:077} eval: ${eval:08} eval10: ${eval10:077} eval10: ${eval10:08} +eval10: ${eval10:0x1234} +eval: ${eval:2+42%5} +eval: ${eval:0xc&5} +eval: ${eval:0xc & 5 } +eval: ${eval:0x0c|5} +eval: ${eval:0xc^5} +eval: ${eval:0xc>>1} +eval: ${eval:0xc >> 2} +eval: ${eval:0xc >> 4 } +eval: ${eval:0xc<<1} +eval: ${eval:~255&0x1234} +eval: ${eval:~ 255&0x1234} +eval: ${eval: -(~255&0x1234)} + expand: \$primary_hostname ${expand:\$primary_hostname} hash: ${hash_3:monty} ${hash_5:monty} ${hash_4_62:monty python} hash: ${hash_3:abc}X ${hash_3:ab}X ${hash_3:a}X ${hash_3:}X diff --git a/test/stdout/0002 b/test/stdout/0002 index 188a9752f..a202d1ebb 100644 --- a/test/stdout/0002 +++ b/test/stdout/0002 @@ -48,15 +48,29 @@ > eval: 1 > eval: 1 > Failed: error in expression evaluation: expecting closing parenthesis (after processing "-2 - (-3") -> Failed: error in expression evaluation: expecting + or - (after processing "-2 - -3") +> Failed: error in expression evaluation: expecting operator (after processing "-2 - -3") > eval: 1 > eval: -5 -> Failed: error in expression evaluation: expecting number or opening parenthesis (after processing "-2 -") +> eval: 1 > eval: 40962 > eval: 63 -> Failed: error in expression evaluation: expecting + or - (after processing "0") +> Failed: error in expression evaluation: expecting operator (after processing "0") > eval10: 77 > eval10: 8 +> Failed: error in expression evaluation: expecting operator (after processing "0") +> eval: 4 +> eval: 4 +> eval: 4 +> eval: 13 +> eval: 9 +> eval: 6 +> eval: 3 +> eval: 0 +> eval: 24 +> eval: 4608 +> eval: 4608 +> eval: -4608 +> > expand: $primary_hostname myhost.test.ex > hash: jmg monty fbWx > hash: abcX abX aX X |