diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-18 18:18:34 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-18 18:18:34 +0000 |
| commit | 40eeadbde0d91bf1028bb5e655f1428953ee66dd (patch) | |
| tree | d29886972965b5e4ae5d0df6885ea9f660406700 /test/ral | |
| parent | 2a3f56cc91a38cc6046aeb7f301058561d8d55f7 (diff) | |
Adding example cron tab from #492 and making the read/write tests ignore whitespace. This cron now parses successfully, as I thought it would with the move to providers.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2291 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/ral')
| -rwxr-xr-x | test/ral/providers/cron/crontab.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |
