4
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
4
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
6
6
# This program is free software: you can redistribute it and/or modify
7
7
# it under the terms of the GNU General Public License as published by
70
70
['eq-wid-6', qw(-w +1 2), {OUT => [qw(1 2)]}],
71
71
['eq-wid-7', qw(-w " .1" " .1"), {OUT => [qw(0.1)]}],
72
72
['eq-wid-8', qw(-w 9 0.5 10), {OUT => [qw(09.0 09.5 10.0)]}],
73
# Prior to 8.21, these tests involving numbers in scentific notation
74
# would fail with misalignment or wrong widths.
75
['eq-wid-9', qw(-w -1e-3 1), {OUT => [qw(-0.001 00.999)]}],
76
['eq-wid-10',qw(-w -1e-003 1), {OUT => [qw(-0.001 00.999)]}],
77
['eq-wid-11',qw(-w -1.e-3 1), {OUT => [qw(-0.001 00.999)]}],
78
['eq-wid-12',qw(-w -1.0e-4 1), {OUT => [qw(-0.00010 00.99990)]}],
79
['eq-wid-13',qw(-w 999 1e3), {OUT => [qw(0999 1000)]}],
80
# Prior to 8.21, if the start value hadn't a precision, while step did,
81
# then misalignment would occur if the sequence narrowed.
82
['eq-wid-14',qw(-w -1 1.0 0), {OUT => [qw(-1.0 00.0)]}],
83
['eq-wid-15',qw(-w 10 -.1 9.9), {OUT => [qw(10.0 09.9)]}],
74
85
# Prior to coreutils-4.5.11, some of these were not accepted.
75
86
['fmt-1', qw(-f %2.1f 1.5 .5 2),{OUT => [qw(1.5 2.0)]}],
121
132
['long-leading-zeros2', qw(000 02), {OUT => [qw(0 1 2)]}],
122
133
['long-leading-zeros3', qw(00 02), {OUT => [qw(0 1 2)]}],
123
134
['long-leading-zeros4', qw(0 02), {OUT => [qw(0 1 2)]}],
136
# Exercise the -s option, which was broken in 8.20
137
['sep-1', qw(-s, 1 3), {OUT => [qw(1,2,3)]}],
138
['sep-2', qw(-s, 1 1), {OUT => [qw(1)]}],
139
['sep-3', qw(-s,, 1 3), {OUT => [qw(1,,2,,3)]}],
141
# Exercise fast path avoidance logic.
142
# In 8.20 a step value != 1, with positive integer start and end was broken
143
['not-fast-1', qw(1 3 1), {OUT => [qw(1)]}],
144
['not-fast-2', qw(1 1 4.2), {OUT => [qw(1 2 3 4)]}],
145
['not-fast-3', qw(1 1 0)],
147
# Ensure the correct parameters are passed to the fast path
148
['fast-1', qw(4), {OUT => [qw(1 2 3 4)]}],
149
['fast-2', qw(1 4), {OUT => [qw(1 2 3 4)]}],
150
['fast-3', qw(1 1 4), {OUT => [qw(1 2 3 4)]}],
126
153
# Append a newline to each entry in the OUT array.