Merge pull request #3258 from omegahm/symlink-local-tmp

This commit is contained in:
Parker Moore 2015-01-10 00:12:06 -08:00
commit 0bf82e9cf7
4 changed files with 8 additions and 4 deletions

2
.gitignore vendored
View File

@ -13,5 +13,5 @@ site/_site/
coverage coverage
.ruby-version .ruby-version
.sass-cache .sass-cache
tmp/stackprof-* tmp/*
.jekyll-metadata .jekyll-metadata

View File

@ -4,6 +4,10 @@
# script/test # script/test
# script/test <test_file> # script/test <test_file>
if [ ! -d tmp ]; then
mkdir tmp
fi
if [ -z "$1" ]; then if [ -z "$1" ]; then
TEST_FILES=$(ruby -e "puts Dir.glob('test/test_*.rb')") TEST_FILES=$(ruby -e "puts Dir.glob('test/test_*.rb')")
else else

View File

@ -1 +1 @@
/tmp ../../../tmp/

View File

@ -359,7 +359,7 @@ CONTENT
context "with symlink'd include" do context "with symlink'd include" do
should "not allow symlink includes" do should "not allow symlink includes" do
File.open("/tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") } File.open("tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") }
assert_raise IOError do assert_raise IOError do
content = <<CONTENT content = <<CONTENT
--- ---
@ -650,7 +650,7 @@ CONTENT
context "with symlink'd include" do context "with symlink'd include" do
should "not allow symlink includes" do should "not allow symlink includes" do
File.open("/tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") } File.open("tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") }
assert_raise IOError do assert_raise IOError do
content = <<CONTENT content = <<CONTENT
--- ---