pkgsrc/pkgtools/check-portability/files/testdata/random
rillig 703d1f721c pkgtools/check-portability: update to 20.1.0
Changes since 19.4.3:

The variable name RANDOM_FILE is ok since it doesn't have a special
meaning to some shell implementations. Seen in www/curl.
2020-04-19 12:05:14 +00:00

21 lines
474 B
Bash

#! /bin/sh
#
# This file demonstrates which patterns are detected by the check for
# random numbers without other sources of randomness.
# Having a single low-entropy random source is bad.
$RANDOM
# These two are ok.
$RANDOM-$$
$$-$RANDOM
# This is not the style used in GNU configure scripts, thus no warning
# is necessary. This doesn't occur in practice.
${RANDOM}
# This is not a special variable.
$RANDOMNESS
# This is not a special variable as well.
$RANDOM_FILE