mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Option to specify custom pattern for template filenames
This commit is contained in:
@@ -25,5 +25,10 @@ class FileSystemTest < Test::Unit::TestCase
|
||||
assert_raise(FileSystemError) do
|
||||
file_system.full_path("/etc/passwd")
|
||||
end
|
||||
|
||||
# custom pattern for template filenames
|
||||
file_system = Liquid::LocalFileSystem.new("/some/path", "%s.html")
|
||||
assert_equal "/some/path/mypartial.html" , file_system.full_path("mypartial")
|
||||
assert_equal "/some/path/dir/mypartial.html", file_system.full_path("dir/mypartial")
|
||||
end
|
||||
end # FileSystemTest
|
||||
|
||||
Reference in New Issue
Block a user