diff options
-rw-r--r-- | test/data/providers/cron/examples/openbsd | 20 | ||||
-rwxr-xr-x | test/ral/providers/cron/crontab.rb | 5 |
2 files changed, 24 insertions, 1 deletions
diff --git a/test/data/providers/cron/examples/openbsd b/test/data/providers/cron/examples/openbsd new file mode 100644 index 000000000..d77597da0 --- /dev/null +++ b/test/data/providers/cron/examples/openbsd @@ -0,0 +1,20 @@ +# +SHELL=/bin/sh +PATH=/bin:/sbin:/usr/bin:/usr/sbin +HOME=/var/log +# +#minute hour mday month wday command +# +# sendmail clientmqueue runner +*/30 * * * * /usr/sbin/sendmail -L sm-msp-queue -Ac -q +# +# rotate log files every hour, if necessary +0 * * * * /usr/bin/newsyslog +# send log file notifications, if necessary +#1-59 * * * * /usr/bin/newsyslog -m +# +# do daily/weekly/monthly maintenance +30 1 * * * /bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | mail -s "`/bin/hostname` daily output" root +30 3 * * 6 /bin/sh /etc/weekly 2>&1 | tee /var/log/weekly.out | mail -s "`/bin/hostname` weekly output" root +30 5 1 * * /bin/sh /etc/monthly 2>&1 | tee /var/log/monthly.out | mail -s "`/bin/hostname` monthly output" root +#0 * * * * /usr/libexec/spamd-setup diff --git a/test/ral/providers/cron/crontab.rb b/test/ral/providers/cron/crontab.rb index 6d0d1e8a9..c28b12ffd 100755 --- a/test/ral/providers/cron/crontab.rb +++ b/test/ral/providers/cron/crontab.rb @@ -281,7 +281,10 @@ class TestCronParsedProvider < Test::Unit::TestCase @provider.flush_target(@me) end - assert_equal(text, target.read, + # Ignore whitespace differences, since those don't affect function. + modtext = text.gsub(/[ \t]+/, " ") + modtarget = target.read.gsub(/[ \t]+/, " ") + assert_equal(modtext, modtarget, "File was not rewritten the same") @provider.clear |