4 # test the bit operators '&', '|' and '^'
10 print ((0xdead & 0xbeef) == 0x9ead ? "ok 1\n" : "not ok 1\n");
11 print ((0xdead | 0xbeef) == 0xfeef ? "ok 2\n" : "not ok 2\n");
12 print ((0xdead ^ 0xbeef) == 0x6042 ? "ok 3\n" : "not ok 3\n");
15 print (("AAAAA" & "zzzzz") eq '@@@@@' ? "ok 4\n" : "not ok 4\n");
16 print (("AAAAA" | "zzzzz") eq '{{{{{' ? "ok 5\n" : "not ok 5\n");
17 print (("AAAAA" ^ "zzzzz") eq ';;;;;' ? "ok 6\n" : "not ok 6\n");
22 print (($foo & $bar) eq ('@'x75 ) ? "ok 7\n" : "not ok 7\n");
23 print (($foo | $bar) eq ('{'x75 . 'A'x75) ? "ok 8\n" : "not ok 8\n");
24 print (($foo ^ $bar) eq (';'x75 . 'A'x75) ? "ok 9\n" : "not ok 9\n");