Sha256: 4fcf356c72de4d2b9fd42606703f600d0296cc72637785ab67b1c40f4813bc89
Contents?: true
Size: 625 Bytes
Versions: 10
Compression:
Stored size: 625 Bytes
Contents
require 'helper' class TestPathSanitization < Test::Unit::TestCase context "on Windows with absolute source" do setup do @source = "C:/Users/xmr/Desktop/mpc-hc.org" @dest = "./_site/" stub(Dir).pwd { "C:/Users/xmr/Desktop/mpc-hc.org" } end should "strip drive name from path" do assert_equal "C:/Users/xmr/Desktop/mpc-hc.org/_site", Jekyll.sanitized_path(@source, @dest) end should "strip just the initial drive name" do assert_equal "/tmp/foobar/jail/..c:/..c:/..c:/etc/passwd", Jekyll.sanitized_path("/tmp/foobar/jail", "..c:/..c:/..c:/etc/passwd") end end end
Version data entries
10 entries across 10 versions & 1 rubygems