1#!/bin/sh
2
3# === THIS IS A __TEMPLATE__ ===
4
5# Test the factor rewrite.
6# The test is to run this command
7# seq $START $END | factor | shasum -c --status <(echo $CKSUM  -)
8# I.e., to ensure that the factorizations of integers $1..$2
9# match what we expect.
10#
11# See: tests/factor/create-test.sh
12
13# Copyright (C) 2012-2023 Free Software Foundation, Inc.
14
15. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
16
17# Don't run these tests by default.
18very_expensive_
19
20print_ver_ factor seq sha1sum
21
22# Template variables.
23START=__START__
24  END=__END__
25CKSUM=__CKSUM__
26
27test "$START" = '__ST''ART__' && skip_ 'ignoring factor test template'
28
29echo "$CKSUM  -" > exp
30
31f=1
32seq $START $END | factor | sha1sum -c --status exp && f=0
33
34Exit $f
35