X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/00eff9c57b7845d7878b1f6a59dac6c5c1d060a4..9bca44cb97d2b5d01f41163932b260ae3a900299:/tests/mptext diff --git a/tests/mptext b/tests/mptext index 6da5aeb..71acb86 100644 --- a/tests/mptext +++ b/tests/mptext @@ -1,6 +1,6 @@ # Test vectors for MP textual I/O # -# $Id: mptext,v 1.6 2001/02/03 16:10:27 mdw Exp $ +# $Id: mptext,v 1.11 2002/10/15 22:57:43 mdw Exp $ mptext-ascii { # --- Perfectly valid things --- @@ -10,10 +10,12 @@ mptext-ascii { 10 52 10 52; 10 654365464655464577673765769678 10 654365464655464577673765769678; 10 654365464655464577673765769678 16 8425e6d06f272b9a2d73ed1ce; + 10 596569802840985608098409867 8 366570443501403714657464766613; 16 8425E6D06F272B9A2D73ED1CE 10 654365464655464577673765769678; 0 654365464655464577673765769678 16 8425e6d06f272b9a2d73ed1ce; 0 16_8425E6D06F272B9A2D73ED1CE 10 654365464655464577673765769678; 0 -0x8425E6D06F272B9A2D73ED1CE 10 -654365464655464577673765769678; + 0 -8_366570443501403714657464766613 10 -596569802840985608098409867; 8 -366570443501403714657464766613 10 -596569802840985608098409867; 0 0366570443501403714657464766613 10 596569802840985608098409867; @@ -23,9 +25,45 @@ mptext-ascii { 10 foo 0 0; # Non-numeric character 10 134f 10 134; # Stop parsing when reaching `f' 4 12345 10 27; # Stop parsing when reaching `4' - 0 37_ 10 37; # 37 is an invalid base, so stop at `_' + 0 63_ 10 63; # 37 is an invalid base, so stop at `_' 0 36_ 0 0; # 36 is a valid base, so restart and fail + # --- Big bases --- + + 62 0 10 0; + 10 0 62 0; + 36 A 10 10; + 36 Z 10 35; + 37 A 10 36; + 10 36 37 A; + 62 Z 10 61; + + 0 36_a 10 10; + 0 36_A 10 10; + 0 37_A 10 36; + + 0 0x10 10 16; + 0 0o10 10 8; + 0 0b10 10 2; + 0 010 10 8; + + # --- Word-boundary tests for binary-radix translation --- + + 0 0 16 0; + 8 1234567012 8 1234567012; + 8 12345670123 8 12345670123; + 8 123456701234 8 123456701234; + + 16 1234567 16 1234567; + 16 12345678 16 12345678; + 16 123456789 16 123456789; + + 10 -4009356060 16 -eef9eb1c; + + # --- Cussidness --- + + 0 -0 10 0; + # --- Bugs --- 16 84d192cd06ae59691897fa409da6198d5269325d