1
0
Fork 0
coreutils/tests/factor/run.sh
Daniel Baumann c08a8f7410
Adding upstream version 9.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-21 07:57:52 +02:00

34 lines
725 B
Bash
Executable file

#!/bin/sh
# === THIS IS A __TEMPLATE__ ===
# Test the factor rewrite.
# The test is to run this command
# seq $START $END | factor | shasum -c --status <(echo $CKSUM -)
# I.e., to ensure that the factorizations of integers $1..$2
# match what we expect.
#
# See: tests/factor/create-test.sh
# Copyright (C) 2012-2025 Free Software Foundation, Inc.
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
# Don't run these tests by default.
very_expensive_
print_ver_ factor seq sha1sum
# Template variables.
START=__START__
END=__END__
CKSUM=__CKSUM__
test "$START" = '__ST''ART__' && skip_ 'ignoring factor test template'
echo "$CKSUM -" > exp
f=1
seq $START $END | factor | sha1sum -c --status exp && f=0
Exit $f