summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael V. O'Brien <michael@reductivelabs.com>2007-10-09 10:43:17 -0500
committerMichael V. O'Brien <michael@reductivelabs.com>2007-10-09 10:43:17 -0500
commitd4871bf5fbeff53670ea6c82b2ee3f3c3ea01c83 (patch)
tree94bb75475dd07bee2b7e029eacca10f45d4b3bca /test
parent01f132d8b88467dfd314ad355f1cdf9f546945b3 (diff)
parent5c32c8e8382d800968225734d06663c1a75d80b2 (diff)
downloadpuppet-d4871bf5fbeff53670ea6c82b2ee3f3c3ea01c83.tar.gz
puppet-d4871bf5fbeff53670ea6c82b2ee3f3c3ea01c83.tar.xz
puppet-d4871bf5fbeff53670ea6c82b2ee3f3c3ea01c83.zip
Merge branch 'parser-absent' of http://marcin.owsiany.pl/tmp/puppet into porridge
Diffstat (limited to 'test')
-rwxr-xr-xtest/util/fileparsing.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/util/fileparsing.rb b/test/util/fileparsing.rb
index 127dbe1d1..e1a5d39b5 100755
--- a/test/util/fileparsing.rb
+++ b/test/util/fileparsing.rb
@@ -456,12 +456,21 @@ billy three four\n"
:separator => " " # A single space
end
- ["a b c d", "a b * d", "a b * *", "a b c *"].each do |line|
+ { "a b c d" => [],
+ "a b * d" => [:three],
+ "a b * *" => [:three, :four],
+ "a b c *" => [:four]
+ }.each do |line, absentees|
record = nil
assert_nothing_raised do
record = @parser.parse_line(line)
end
+ # Absent field is :absent, not "*" inside the record
+ absentees.each do |absentee|
+ assert_equal(:absent, record[absentee])
+ end
+
# Now regenerate the line
newline = nil
assert_nothing_raised do