test/glob_test.rb in glob-0.3.0 vs test/glob_test.rb in glob-0.3.1

- old
+ new

@@ -218,6 +218,26 @@ "pt.messages.hello" ] assert_equal expected, glob.paths end + + test "with keys that contain dots" do + data = { + "keys.with.dots" => "dots", + node: { + "more.keys.with.dots" => "more dots" + } + } + + glob = Glob.new(data) + + glob << "*" + + assert_equal %w[keys\\.with\\.dots node.more\\.keys\\.with\\.dots], + glob.paths + assert_equal Glob::SymbolizeKeys.call(data), glob.to_h + + assert_equal ({node: {"more.keys.with.dots": "more dots"}}), + Glob.filter(data, ["node.more\\.keys\\.with\\.dots"]) + end end