diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-04-04 03:08:23 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2018-04-11 23:12:07 -0600 |
| commit | cd44e0a8d490bd43f7ead4f3c9c43cadd2471f77 (patch) | |
| tree | c29734e3ca5101f3504e2b0cf4c3f76ad9393674 /test/paths_test.rb | |
| parent | 061cc583b5b264a5de994f5bb2b436f9a6291840 (diff) | |
change PathResolver#expand_path to resolve parent references
Diffstat (limited to 'test/paths_test.rb')
| -rw-r--r-- | test/paths_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/paths_test.rb b/test/paths_test.rb index fe984584..dc6d46cb 100644 --- a/test/paths_test.rb +++ b/test/paths_test.rb @@ -142,6 +142,10 @@ context 'Path Resolver' do assert_equal "#{JAIL}/assets/stylesheets", @resolver.system_path(nil, "#{JAIL}/assets/stylesheets", JAIL) end + test 'expands parent references in start path if target is empty' do + assert_equal "#{JAIL}/stylesheets", @resolver.system_path('', "#{JAIL}/assets/../stylesheets", JAIL) + end + test 'resolves start path if target is dot' do assert_equal "#{JAIL}/assets/stylesheets", @resolver.system_path('.', "#{JAIL}/assets/stylesheets", JAIL) assert_equal "#{JAIL}/assets/stylesheets", @resolver.system_path('./', "#{JAIL}/assets/stylesheets", JAIL) |
