mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
add symlink failing test
Signed-off-by: Parker Moore <parkrmoore@gmail.com>
This commit is contained in:
1
test/source/_includes/about.html
Symbolic link
1
test/source/_includes/about.html
Symbolic link
@@ -0,0 +1 @@
|
||||
../about.html
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
title: About
|
||||
permalink: /about/
|
||||
---
|
||||
|
||||
About the site
|
||||
1
test/source/about.html
Symbolic link
1
test/source/about.html
Symbolic link
@@ -0,0 +1 @@
|
||||
/tmp/pages-test
|
||||
@@ -363,6 +363,27 @@ CONTENT
|
||||
end
|
||||
|
||||
context "include tag with parameters" do
|
||||
|
||||
context "with symlink'd include" do
|
||||
|
||||
setup do
|
||||
content = <<CONTENT
|
||||
---
|
||||
title: Include symlink
|
||||
---
|
||||
|
||||
{% include about.html %}
|
||||
|
||||
CONTENT
|
||||
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
|
||||
end
|
||||
|
||||
should "not allow symlink includes" do
|
||||
File.open("/tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") }
|
||||
assert_no_match /SYMLINK TEST/, @result
|
||||
end
|
||||
end
|
||||
|
||||
context "with one parameter" do
|
||||
setup do
|
||||
content = <<CONTENT
|
||||
|
||||
Reference in New Issue
Block a user