cksum: ensure appropriate "binary" mode with --untagged
[coreutils.git] / tests / seq / seq-extra-number.sh
blob25193e9e9b4716a6ada982014665110f41763ce3
1 #!/bin/sh
2 # Test the "print_extra_number" logic seq.c:print_numbers()
4 # Copyright (C) 2019-2024 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <https://www.gnu.org/licenses/>.
19 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
20 print_ver_ seq
23 ## Test 1: the documented reason for the logic
25 cat<<'EOF'>exp1 || framework_failure_
26 0.000000
27 0.000001
28 0.000002
29 0.000003
30 EOF
32 seq 0 0.000001 0.000003 > out1 || fail=1
33 compare exp1 out1 || fail=1
37 ## Test 2: before 8.32, this resulted in TWO lines
38 ## (print_extra_number was erroneously set to true)
39 ## The '=' is there instead of a space to ease visual inspection.
40 cat<<'EOF'>exp2 || framework_failure_
41 1e+06=
42 EOF
44 seq -f "%g=" 1000000 1000000 > out2 || fail=1
45 compare exp2 out2 || fail=1
47 Exit $fail