Blob Blame History Raw
diff --git a/test/test_tags.rb b/test/test_tags.rb
index ae75c024..4bb7c209 100644
--- a/test/test_tags.rb
+++ b/test/test_tags.rb
@@ -165,151 +165,6 @@ CONTENT
     end
   end
 
-  context "with the pygments highlighter" do
-    setup do
-      if jruby?
-        then skip(
-          "JRuby does not support Pygments."
-        )
-      end
-    end
-
-    context "post content has highlight tag" do
-      setup do
-        fill_post("test", { "highlighter" => "pygments" })
-      end
-
-      should "not cause a markdown error" do
-        refute_match(%r!markdown\-html\-error!, @result)
-      end
-
-      should "render markdown with pygments" do
-        assert_match(
-          %(<pre><code class="language-text" data-lang="text">) +
-          %(<span></span>test</code></pre>),
-          @result
-        )
-      end
-
-      should "render markdown with pygments with line numbers" do
-        assert_match(
-          %(<pre><code class="language-text" data-lang="text">) +
-          %(<span></span><span class="lineno">1 </span>test</code></pre>),
-          @result
-        )
-      end
-    end
-
-    context "post content has highlight with file reference" do
-      setup do
-        fill_post("./jekyll.gemspec", { "highlighter" => "pygments" })
-      end
-
-      should "not embed the file" do
-        assert_match(
-          %(<pre><code class="language-text" data-lang="text"><span></span>) +
-          %(./jekyll.gemspec</code></pre>),
-          @result
-        )
-      end
-    end
-
-    context "post content has highlight tag with UTF character" do
-      setup do
-        fill_post("Æ", { "highlighter" => "pygments" })
-      end
-
-      should "render markdown with pygments line handling" do
-        assert_match(
-          %(<pre><code class="language-text" data-lang="text">) +
-          %(<span></span>Æ</code></pre>),
-          @result
-        )
-      end
-    end
-
-    context "post content has highlight tag with preceding spaces & lines" do
-      setup do
-        code = <<-EOS
-
-
-     [,1] [,2]
-[1,] FALSE TRUE
-[2,] FALSE TRUE
-EOS
-        fill_post(code, { "highlighter" => "pygments" })
-      end
-
-      should "only strip the preceding newlines" do
-        assert_match(
-          %(<pre><code class=\"language-text\" data-lang=\"text\">) +
-          %(<span></span>     [,1] [,2]),
-          @result
-        )
-      end
-    end
-
-    context "post content has highlight tag " \
-            "with preceding spaces & lines in several places" do
-      setup do
-        code = <<-EOS
-
-
-     [,1] [,2]
-
-
-[1,] FALSE TRUE
-[2,] FALSE TRUE
-
-
-EOS
-        fill_post(code, { "highlighter" => "pygments" })
-      end
-
-      should "only strip the newlines which precede and succeed the entire block" do
-        assert_match(
-          %(<pre><code class=\"language-text\" data-lang=\"text\"><span></span>) +
-          %(     [,1] [,2]\n\n\n[1,] FALSE TRUE\n[2,] FALSE TRUE</code></pre>),
-          @result
-        )
-      end
-    end
-
-    context "post content has highlight tag with " \
-            "preceding spaces & Windows-style newlines" do
-      setup do
-        fill_post "\r\n\r\n\r\n     [,1] [,2]", { "highlighter" => "pygments" }
-      end
-
-      should "only strip the preceding newlines" do
-        assert_match(
-          %(<pre><code class="language-text" data-lang="text"><span></span>) +
-          %(     [,1] [,2]),
-          @result
-        )
-      end
-    end
-
-    context "post content has highlight tag with only preceding spaces" do
-      setup do
-        code = <<-EOS
-     [,1] [,2]
-[1,] FALSE TRUE
-[2,] FALSE TRUE
-EOS
-        fill_post(code, { "highlighter" => "pygments" })
-      end
-
-      should "only strip the preceding newlines" do
-        assert_match(
-          %(<pre><code class=\"language-text\" data-lang=\"text\"><span></span>) +
-          %(     [,1] [,2]),
-          @result
-        )
-      end
-    end
-  end
-
   context "with the rouge highlighter" do
     context "post content has highlight tag" do
       setup do
@@ -1165,177 +1020,5 @@ CONTENT
         )
       end
     end
-
-    context "include tag with variable and liquid filters" do
-      setup do
-        site = fixture_site({ "pygments" => true }).tap(&:read).tap(&:render)
-        post = site.posts.docs.find do |p|
-          p.basename.eql? "2013-12-17-include-variable-filters.markdown"
-        end
-        @content = post.output
-      end
-
-      should "include file as variable with liquid filters" do
-        assert_match(%r!1 included!, @content)
-        assert_match(%r!2 included!, @content)
-        assert_match(%r!3 included!, @content)
-      end
-
-      should "include file as variable and liquid filters with arbitrary whitespace" do
-        assert_match(%r!4 included!, @content)
-        assert_match(%r!5 included!, @content)
-        assert_match(%r!6 included!, @content)
-      end
-
-      should "include file as variable and filters with additional parameters" do
-        assert_match("<li>var1 = foo</li>", @content)
-        assert_match("<li>var2 = bar</li>", @content)
-      end
-
-      should "include file as partial variable" do
-        assert_match(%r!8 included!, @content)
-      end
-    end
-  end
-
-  context "relative include tag with variable and liquid filters" do
-    setup do
-      site = fixture_site({ "pygments" => true }).tap(&:read).tap(&:render)
-      post = site.posts.docs.find do |p|
-        p.basename.eql? "2014-09-02-relative-includes.markdown"
-      end
-      @content = post.output
-    end
-
-    should "include file as variable with liquid filters" do
-      assert_match(%r!1 relative_include!, @content)
-      assert_match(%r!2 relative_include!, @content)
-      assert_match(%r!3 relative_include!, @content)
-    end
-
-    should "include file as variable and liquid filters with arbitrary whitespace" do
-      assert_match(%r!4 relative_include!, @content)
-      assert_match(%r!5 relative_include!, @content)
-      assert_match(%r!6 relative_include!, @content)
-    end
-
-    should "include file as variable and filters with additional parameters" do
-      assert_match("<li>var1 = foo</li>", @content)
-      assert_match("<li>var2 = bar</li>", @content)
-    end
-
-    should "include file as partial variable" do
-      assert_match(%r!8 relative_include!, @content)
-    end
-
-    should "include files relative to self" do
-      assert_match(%r!9 —\ntitle: Test Post Where YAML!, @content)
-    end
-
-    context "trying to do bad stuff" do
-      context "include missing file" do
-        setup do
-          @content = <<CONTENT
----
-title: missing file
----
-
-{% include_relative missing.html %}
-CONTENT
-        end
-
-        should "raise error relative to source directory" do
-          exception = assert_raises IOError do
-            create_post(@content, {
-              "permalink"   => "pretty",
-              "source"      => source_dir,
-              "destination" => dest_dir,
-              "read_posts"  => true,
-            })
-          end
-          assert_match "Could not locate the included file 'missing.html' in any of " \
-                       "[\"#{source_dir}\"].", exception.message
-        end
-      end
-
-      context "include existing file above you" do
-        setup do
-          @content = <<CONTENT
----
-title: higher file
----
-
-{% include_relative ../README.markdown %}
-CONTENT
-        end
-
-        should "raise error relative to source directory" do
-          exception = assert_raises ArgumentError do
-            create_post(@content, {
-              "permalink"   => "pretty",
-              "source"      => source_dir,
-              "destination" => dest_dir,
-              "read_posts"  => true,
-            })
-          end
-          assert_equal(
-            "Invalid syntax for include tag. File contains invalid characters or " \
-            "sequences:\n\n  ../README.markdown\n\nValid syntax:\n\n  " \
-            "{% include_relative file.ext param='value' param2='value' %}\n\n",
-            exception.message
-          )
-        end
-      end
-    end
-
-    context "with symlink'd include" do
-      should "not allow symlink includes" do
-        File.open("tmp/pages-test", "w") { |file| file.write("SYMLINK TEST") }
-        assert_raises IOError do
-          content = <<CONTENT
----
-title: Include symlink
----
-
-{% include_relative tmp/pages-test %}
-
-CONTENT
-          create_post(content, {
-            "permalink"   => "pretty",
-            "source"      => source_dir,
-            "destination" => dest_dir,
-            "read_posts"  => true,
-            "safe"        => true,
-          })
-        end
-        @result ||= ""
-        refute_match(%r!SYMLINK TEST!, @result)
-      end
-
-      should "not expose the existence of symlinked files" do
-        ex = assert_raises IOError do
-          content = <<CONTENT
----
-title: Include symlink
----
-
-{% include_relative tmp/pages-test-does-not-exist %}
-
-CONTENT
-          create_post(content, {
-            "permalink"   => "pretty",
-            "source"      => source_dir,
-            "destination" => dest_dir,
-            "read_posts"  => true,
-            "safe"        => true,
-          })
-        end
-        assert_match(
-          "Ensure it exists in one of those directories and is not a symlink "\
-          "as those are not allowed in safe mode.",
-          ex.message
-        )
-      end
-    end
   end
 end
diff --git a/test/test_redcarpet.rb b/test/test_redcarpet.rb
index 51da49c5..48982ed8 100644
--- a/test/test_redcarpet.rb
+++ b/test/test_redcarpet.rb
@@ -45,23 +45,6 @@ class TestRedcarpet < JekyllUnitTest
         @markdown.convert("**bad code not here**: <script>i am bad</script>").strip
     end
 
-    context "with pygments enabled" do
-      setup do
-        @markdown = Converters::Markdown.new @config.merge(
-          { "highlighter" => "pygments" }
-        )
-      end
-
-      should "render fenced code blocks with syntax highlighting" do
-        assert_equal(
-          %(<div class="highlight"><pre><code class="language-ruby" ) +
-          %(data-lang="ruby"><span></span><span class="nb">puts</span> <span ) +
-          %(class="s2">&quot;Hello world&quot;</span>\n</code></pre></div>),
-          @markdown.convert(@sample).strip
-        )
-      end
-    end
-
     context "with rouge enabled" do
       setup do
         @markdown = Converters::Markdown.new @config.merge({ "highlighter" => "rouge" })