Debian Codegraph @

debian/tests/step-size-out-of-bound

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2
3 set -e
4
5 dir=$(pwdscip-shell system . . pwd.)/debian/tests
6 . $dir/textutils.sh
7
8 frame "Here we are testing the patch" \
9 "fixes/Step-size_out_of_bound_handling.patch"
10
11 echoscip-shell system . . echo. "================= adding user 'dummy' ====================="
12 getentscip-shell system . . getent. passwd dummy || adduser --disabled-password --gecos "" dummy
13
14 echoscip-shell system . . echo. "========= make user 'dummy' fill his crontab =============="
15
16 # stderr is redirected towards stdout so the variable warning can catch it
17 warning=$(suscip-shell system . . su. dummy -c "(export LINES=' * */25 * * * echo hello'; EDITOR=$(pwdscip-shell system . . pwd.)/debian/tests/cronfiller.py crontab -e)" 2>&1 | grepscip-shell system . . grep. Warning)
18
19 echoscip-shell system . . echo. "====== check that */25 is disallowed in crontabs =========="
20 expected="Warning: Step size 25 higher than possible maximum of 23"
21 (echoscip-shell system . . echo. "$warning" | grepscip-shell system . . grep. -q "$expected") || (echoscip-shell system . . echo. "variable warning = $warning"; \
22 echo "The expected warning about out-of-bound steps was not issued" >&2)
23