diff options
author | Marcin Owsiany <marcin@owsiany.pl> | 2007-10-06 13:24:01 +0100 |
---|---|---|
committer | Marcin Owsiany <marcin@owsiany.pl> | 2007-10-06 13:24:01 +0100 |
commit | d055cbc8caa215301bbc81ce551571c82594d7ae (patch) | |
tree | 723005acd2a4209a686260f94f5ef330a23f6097 | |
parent | 95b2b93290f619c20a1c2dca11dd9909477857f8 (diff) | |
download | puppet-d055cbc8caa215301bbc81ce551571c82594d7ae.tar.gz puppet-d055cbc8caa215301bbc81ce551571c82594d7ae.tar.xz puppet-d055cbc8caa215301bbc81ce551571c82594d7ae.zip |
Make it apparent that absent fields in a record have a value of :absent, which is different from what appears in a line.
-rwxr-xr-x | test/util/fileparsing.rb | 11 |
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 |