Sha256: e7cee225ab5c202491477441b9183a52e4428e70c832f5805dac9ba59a81c606
Contents?: true
Size: 1.1 KB
Versions: 10
Compression:
Stored size: 1.1 KB
Contents
module PuppetTest::Support::Collection def run_collection_queries(form) {true => [%{title == "/tmp/testing"}, %{(title == "/tmp/testing")}, %{group == bin}, %{title == "/tmp/testing" and group == bin}, %{title == bin or group == bin}, %{title == "/tmp/testing" or title == bin}, %{title == "/tmp/testing"}, %{(title == "/tmp/testing" or title == bin) and group == bin}], false => [%{title == bin}, %{title == bin or (title == bin and group == bin)}, %{title != "/tmp/testing"}, %{title != "/tmp/testing" and group != bin}] }.each do |res, ary| ary.each do |str| if form == :virtual code = "File <| #{str} |>" else code = "File <<| #{str} |>>" end parser = mkparser query = nil assert_nothing_raised("Could not parse '#{str}'") do query = parser.parse(code).classes[""].code[0].query end yield str, res, query end end end end
Version data entries
10 entries across 10 versions & 1 rubygems