diff options
| author | Marc Fournier <marc.fournier@camptocamp.com> | 2010-03-22 08:46:27 -0400 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 7ab29c4eddd0914da7a18fc9c04144b2cebf4647 (patch) | |
| tree | 9d16d02bb757c6009f4424e81973dfc54694be8b | |
| parent | a8245d86f8d2bd94714cf1fd7654b662208faa0e (diff) | |
| download | puppet-7ab29c4eddd0914da7a18fc9c04144b2cebf4647.tar.gz puppet-7ab29c4eddd0914da7a18fc9c04144b2cebf4647.tar.xz puppet-7ab29c4eddd0914da7a18fc9c04144b2cebf4647.zip | |
Unit tests for path changes
| -rw-r--r-- | spec/unit/provider/augeas/augeas.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/unit/provider/augeas/augeas.rb b/spec/unit/provider/augeas/augeas.rb index 067126cbd..22f7bed8c 100644 --- a/spec/unit/provider/augeas/augeas.rb +++ b/spec/unit/provider/augeas/augeas.rb @@ -141,6 +141,20 @@ describe provider_class do tokens.should == [ args ] end + it "should allow single quoted escaped spaces in paths" do + @resource.stubs(:[]).returns("/foo/") + args = [ "set", "'/white\\ space/key'", "value" ] + tokens = @provider.parse_commands(args.join(" \t ")) + tokens.should == [[ "set", "/white\\ space/key", "value" ]] + end + + it "should allow double quoted escaped spaces in paths" do + @resource.stubs(:[]).returns("/foo/") + args = [ "set", '"/white\\ space/key"', "value" ] + tokens = @provider.parse_commands(args.join(" \t ")) + tokens.should == [[ "set", "/white\\ space/key", "value" ]] + end + it "should remove trailing slashes" do @resource.stubs(:[]).returns("/foo/") tokens = @provider.parse_commands("set foo/ bar") |
