]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Add new tests for the new functionality.
authorJim Meyering <jim@meyering.net>
Sat, 22 Jan 2000 11:10:40 +0000 (11:10 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 22 Jan 2000 11:10:40 +0000 (11:10 +0000)
tests/seq/basic

index 95e563a07ee299568e392466e2d6dcc81efc1cb1..d1002bf3805007a7e2605123adc52c74920d362b 100755 (executable)
@@ -31,6 +31,17 @@ my @Tests =
    ['neg-2',   qw(-.1 .1 .1),  {OUT => [qw(-0.1 0 0.1)]}],
    ['neg-3',   qw(1 -1 0),     {OUT => [qw(1 0)]}],
    ['neg-4',   qw(1 -1 -1),    {OUT => [qw(1 0 -1)]}],
+
+   ['int-1',   qw(--format=%d 1 -1 -1),        {OUT => [qw(1 0 -1)]}],
+   ['int-2',   qw(--format=%02d 1 -1 -1),      {OUT => [qw(01 00 -1)]}],
+   ['int-3',   qw(--format=%03d 1 -1 -1),      {OUT => [qw(001 000 -01)]}],
+
+   # this will fail on systems where `int' != 32 bits
+   ['hex-1',   qw(--format=%x 1 -1 -1),        {OUT => [qw(1 0 ffffffff)]}],
+
+   ['hex-2',   qw(--format=%x 32 36),  {OUT => [qw(20 21 22 23 24)]}],
+
+   ['oct-1',   qw(--format=%o 32 36),  {OUT => [qw(40 41 42 43 44)]}],
   );
 
 # Append a newline to each entry in the OUT array.