From dae77e9a632a02933937dfaa38ffb871c31753e2 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Fri, 27 Feb 2015 17:31:24 -0800 Subject: [PATCH] switch remaining textile test files to markdown Textile support was removed from jekyll core in #3319, and most of the tests switched to markdown at that time. This changes the remaining tests to use markdown as well. The vast majority of the test cases were testing things in the file name or front matter, so it doesn't really matter what markup format they use. The one test that was claiming to test that textile was transformed had actually been moved to markdown as well, just not renamed. Fixes #3507 --- ...tile => 2008-02-02-not-published.markdown} | 0 ....textile => 2008-02-02-published.markdown} | 0 ...e => 2008-12-03-permalinked-post.markdown} | 0 ...e => 2009-01-27-array-categories.markdown} | 0 ...textile => 2009-01-27-categories.markdown} | 0 ...y.textile => 2009-01-27-category.markdown} | 0 ...e => 2009-01-27-empty-categories.markdown} | 0 ...ile => 2009-01-27-empty-category.markdown} | 0 ...extile => 2009-01-27-no-category.markdown} | 0 ....textile => 2009-05-18-empty-tag.markdown} | 0 ...textile => 2009-05-18-empty-tags.markdown} | 0 ...18-tag.textile => 2009-05-18-tag.markdown} | 0 ...-tags.textile => 2009-05-18-tags.markdown} | 0 ...textile => 2009-06-22-empty-yaml.markdown} | 0 ...ml.textile => 2009-06-22-no-yaml.markdown} | 0 ...tile => 2010-01-16-override-data.markdown} | 0 ...textile => 2013-01-12-nil-layout.markdown} | 0 ....textile => 2013-01-12-no-layout.markdown} | 0 ...le => 2013-05-10-number-category.markdown} | 0 ...ted.textile => 2008-11-21-nested.markdown} | 0 ....textile => 2008-9-23-categories.markdown} | 0 ...xtile => 2008-12-12-topical-post.markdown} | 0 ....textile => 2008-9-23-categories.markdown} | 0 test/test_excerpt.rb | 2 +- test/test_post.rb | 52 +++++++++---------- 25 files changed, 27 insertions(+), 27 deletions(-) rename test/source/_posts/{2008-02-02-not-published.textile => 2008-02-02-not-published.markdown} (100%) rename test/source/_posts/{2008-02-02-published.textile => 2008-02-02-published.markdown} (100%) rename test/source/_posts/{2008-12-03-permalinked-post.textile => 2008-12-03-permalinked-post.markdown} (100%) rename test/source/_posts/{2009-01-27-array-categories.textile => 2009-01-27-array-categories.markdown} (100%) rename test/source/_posts/{2009-01-27-categories.textile => 2009-01-27-categories.markdown} (100%) rename test/source/_posts/{2009-01-27-category.textile => 2009-01-27-category.markdown} (100%) rename test/source/_posts/{2009-01-27-empty-categories.textile => 2009-01-27-empty-categories.markdown} (100%) rename test/source/_posts/{2009-01-27-empty-category.textile => 2009-01-27-empty-category.markdown} (100%) rename test/source/_posts/{2009-01-27-no-category.textile => 2009-01-27-no-category.markdown} (100%) rename test/source/_posts/{2009-05-18-empty-tag.textile => 2009-05-18-empty-tag.markdown} (100%) rename test/source/_posts/{2009-05-18-empty-tags.textile => 2009-05-18-empty-tags.markdown} (100%) rename test/source/_posts/{2009-05-18-tag.textile => 2009-05-18-tag.markdown} (100%) rename test/source/_posts/{2009-05-18-tags.textile => 2009-05-18-tags.markdown} (100%) rename test/source/_posts/{2009-06-22-empty-yaml.textile => 2009-06-22-empty-yaml.markdown} (100%) rename test/source/_posts/{2009-06-22-no-yaml.textile => 2009-06-22-no-yaml.markdown} (100%) rename test/source/_posts/{2010-01-16-override-data.textile => 2010-01-16-override-data.markdown} (100%) rename test/source/_posts/{2013-01-12-nil-layout.textile => 2013-01-12-nil-layout.markdown} (100%) rename test/source/_posts/{2013-01-12-no-layout.textile => 2013-01-12-no-layout.markdown} (100%) rename test/source/_posts/{2013-05-10-number-category.textile => 2013-05-10-number-category.markdown} (100%) rename test/source/_posts/es/{2008-11-21-nested.textile => 2008-11-21-nested.markdown} (100%) rename test/source/category/_posts/{2008-9-23-categories.textile => 2008-9-23-categories.markdown} (100%) rename test/source/foo/_posts/bar/{2008-12-12-topical-post.textile => 2008-12-12-topical-post.markdown} (100%) rename test/source/z_category/_posts/{2008-9-23-categories.textile => 2008-9-23-categories.markdown} (100%) diff --git a/test/source/_posts/2008-02-02-not-published.textile b/test/source/_posts/2008-02-02-not-published.markdown similarity index 100% rename from test/source/_posts/2008-02-02-not-published.textile rename to test/source/_posts/2008-02-02-not-published.markdown diff --git a/test/source/_posts/2008-02-02-published.textile b/test/source/_posts/2008-02-02-published.markdown similarity index 100% rename from test/source/_posts/2008-02-02-published.textile rename to test/source/_posts/2008-02-02-published.markdown diff --git a/test/source/_posts/2008-12-03-permalinked-post.textile b/test/source/_posts/2008-12-03-permalinked-post.markdown similarity index 100% rename from test/source/_posts/2008-12-03-permalinked-post.textile rename to test/source/_posts/2008-12-03-permalinked-post.markdown diff --git a/test/source/_posts/2009-01-27-array-categories.textile b/test/source/_posts/2009-01-27-array-categories.markdown similarity index 100% rename from test/source/_posts/2009-01-27-array-categories.textile rename to test/source/_posts/2009-01-27-array-categories.markdown diff --git a/test/source/_posts/2009-01-27-categories.textile b/test/source/_posts/2009-01-27-categories.markdown similarity index 100% rename from test/source/_posts/2009-01-27-categories.textile rename to test/source/_posts/2009-01-27-categories.markdown diff --git a/test/source/_posts/2009-01-27-category.textile b/test/source/_posts/2009-01-27-category.markdown similarity index 100% rename from test/source/_posts/2009-01-27-category.textile rename to test/source/_posts/2009-01-27-category.markdown diff --git a/test/source/_posts/2009-01-27-empty-categories.textile b/test/source/_posts/2009-01-27-empty-categories.markdown similarity index 100% rename from test/source/_posts/2009-01-27-empty-categories.textile rename to test/source/_posts/2009-01-27-empty-categories.markdown diff --git a/test/source/_posts/2009-01-27-empty-category.textile b/test/source/_posts/2009-01-27-empty-category.markdown similarity index 100% rename from test/source/_posts/2009-01-27-empty-category.textile rename to test/source/_posts/2009-01-27-empty-category.markdown diff --git a/test/source/_posts/2009-01-27-no-category.textile b/test/source/_posts/2009-01-27-no-category.markdown similarity index 100% rename from test/source/_posts/2009-01-27-no-category.textile rename to test/source/_posts/2009-01-27-no-category.markdown diff --git a/test/source/_posts/2009-05-18-empty-tag.textile b/test/source/_posts/2009-05-18-empty-tag.markdown similarity index 100% rename from test/source/_posts/2009-05-18-empty-tag.textile rename to test/source/_posts/2009-05-18-empty-tag.markdown diff --git a/test/source/_posts/2009-05-18-empty-tags.textile b/test/source/_posts/2009-05-18-empty-tags.markdown similarity index 100% rename from test/source/_posts/2009-05-18-empty-tags.textile rename to test/source/_posts/2009-05-18-empty-tags.markdown diff --git a/test/source/_posts/2009-05-18-tag.textile b/test/source/_posts/2009-05-18-tag.markdown similarity index 100% rename from test/source/_posts/2009-05-18-tag.textile rename to test/source/_posts/2009-05-18-tag.markdown diff --git a/test/source/_posts/2009-05-18-tags.textile b/test/source/_posts/2009-05-18-tags.markdown similarity index 100% rename from test/source/_posts/2009-05-18-tags.textile rename to test/source/_posts/2009-05-18-tags.markdown diff --git a/test/source/_posts/2009-06-22-empty-yaml.textile b/test/source/_posts/2009-06-22-empty-yaml.markdown similarity index 100% rename from test/source/_posts/2009-06-22-empty-yaml.textile rename to test/source/_posts/2009-06-22-empty-yaml.markdown diff --git a/test/source/_posts/2009-06-22-no-yaml.textile b/test/source/_posts/2009-06-22-no-yaml.markdown similarity index 100% rename from test/source/_posts/2009-06-22-no-yaml.textile rename to test/source/_posts/2009-06-22-no-yaml.markdown diff --git a/test/source/_posts/2010-01-16-override-data.textile b/test/source/_posts/2010-01-16-override-data.markdown similarity index 100% rename from test/source/_posts/2010-01-16-override-data.textile rename to test/source/_posts/2010-01-16-override-data.markdown diff --git a/test/source/_posts/2013-01-12-nil-layout.textile b/test/source/_posts/2013-01-12-nil-layout.markdown similarity index 100% rename from test/source/_posts/2013-01-12-nil-layout.textile rename to test/source/_posts/2013-01-12-nil-layout.markdown diff --git a/test/source/_posts/2013-01-12-no-layout.textile b/test/source/_posts/2013-01-12-no-layout.markdown similarity index 100% rename from test/source/_posts/2013-01-12-no-layout.textile rename to test/source/_posts/2013-01-12-no-layout.markdown diff --git a/test/source/_posts/2013-05-10-number-category.textile b/test/source/_posts/2013-05-10-number-category.markdown similarity index 100% rename from test/source/_posts/2013-05-10-number-category.textile rename to test/source/_posts/2013-05-10-number-category.markdown diff --git a/test/source/_posts/es/2008-11-21-nested.textile b/test/source/_posts/es/2008-11-21-nested.markdown similarity index 100% rename from test/source/_posts/es/2008-11-21-nested.textile rename to test/source/_posts/es/2008-11-21-nested.markdown diff --git a/test/source/category/_posts/2008-9-23-categories.textile b/test/source/category/_posts/2008-9-23-categories.markdown similarity index 100% rename from test/source/category/_posts/2008-9-23-categories.textile rename to test/source/category/_posts/2008-9-23-categories.markdown diff --git a/test/source/foo/_posts/bar/2008-12-12-topical-post.textile b/test/source/foo/_posts/bar/2008-12-12-topical-post.markdown similarity index 100% rename from test/source/foo/_posts/bar/2008-12-12-topical-post.textile rename to test/source/foo/_posts/bar/2008-12-12-topical-post.markdown diff --git a/test/source/z_category/_posts/2008-9-23-categories.textile b/test/source/z_category/_posts/2008-9-23-categories.markdown similarity index 100% rename from test/source/z_category/_posts/2008-9-23-categories.textile rename to test/source/z_category/_posts/2008-9-23-categories.markdown diff --git a/test/test_excerpt.rb b/test/test_excerpt.rb index ac4771762f5..ecd42148fc9 100644 --- a/test/test_excerpt.rb +++ b/test/test_excerpt.rb @@ -88,7 +88,7 @@ def do_render(post) assert_gets_called = false klass.send(:define_method, :assert_gets_called) { assert_gets_called = true } klass.const_set(:EXCERPT_ATTRIBUTES_FOR_LIQUID, Jekyll::Post::EXCERPT_ATTRIBUTES_FOR_LIQUID + ['assert_gets_called']) - post = klass.new(@site, source_dir, '', "2008-02-02-published.textile") + post = klass.new(@site, source_dir, '', "2008-02-02-published.markdown") Jekyll::Excerpt.new(post).to_liquid assert assert_gets_called, 'assert_gets_called did not get called on post.' diff --git a/test/test_post.rb b/test/test_post.rb index ef5b4a46a45..20ea65248da 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -82,14 +82,14 @@ def do_render(post) post = Post.allocate post.categories = ['foo'] post.site = @site - post.process("cat1/2008-09-09-foo-bar.textile") + post.process("cat1/2008-09-09-foo-bar.markdown") assert_equal 1, post.categories.size assert_equal "foo", post.categories[0] post = Post.allocate post.categories = ['foo', 'bar'] post.site = @site - post.process("cat2/CAT3/2008-09-09-foo-bar.textile") + post.process("cat2/CAT3/2008-09-09-foo-bar.markdown") assert_equal 2, post.categories.size assert_equal "foo", post.categories[0] assert_equal "bar", post.categories[1] @@ -104,7 +104,7 @@ def do_render(post) should "raise a good error on invalid post date" do assert_raises Jekyll::Errors::FatalException do - @post.process("2009-27-03-foo-bar.textile") + @post.process("2009-27-03-foo-bar.markdown") end end @@ -131,7 +131,7 @@ def do_render(post) end should "respect permalink in yaml front matter" do - file = "2008-12-03-permalinked-post.textile" + file = "2008-12-03-permalinked-post.markdown" @post.process(file) @post.read_yaml(@source, file) @@ -230,7 +230,7 @@ def do_render(post) context "with specified layout of nil" do setup do - file = '2013-01-12-nil-layout.textile' + file = '2013-01-12-nil-layout.markdown' @post = setup_post(file) @post.process(file) end @@ -369,7 +369,7 @@ def do_render(post) assert_equal "# {{ page.title }}\n\nBest **post** ever", @post.content end - should "transform textile" do + should "transform markdown" do @post.process(@real_file) @post.read_yaml(@source, @real_file) assert_equal "

{{ page.title }}

\n\n

Best post ever

", @post.transform.strip @@ -461,8 +461,8 @@ def do_render(post) setup do clear_dest @site = fixture_site - @site.posts = [setup_post('2008-02-02-published.textile'), - setup_post('2009-01-27-categories.textile')] + @site.posts = [setup_post('2008-02-02-published.markdown'), + setup_post('2009-01-27-categories.markdown')] end should "have next post" do @@ -511,7 +511,7 @@ def do_render(post) end should "to_liquid prioritizes post attributes over data" do - post = setup_post("2010-01-16-override-data.textile") + post = setup_post("2010-01-16-override-data.markdown") assert_equal Array, post.tags.class assert_equal Array, post.to_liquid["tags"].class assert_equal Time, post.date.class @@ -523,36 +523,36 @@ def do_render(post) assert_gets_called = false klass.send(:define_method, :assert_gets_called) { assert_gets_called = true } klass.const_set(:EXCERPT_ATTRIBUTES_FOR_LIQUID, Jekyll::Post::EXCERPT_ATTRIBUTES_FOR_LIQUID + ['assert_gets_called']) - post = klass.new(@site, source_dir, '', "2008-02-02-published.textile") + post = klass.new(@site, source_dir, '', "2008-02-02-published.markdown") do_render(post) assert assert_gets_called, 'assert_gets_called did not get called on post.' end should "recognize category in yaml" do - post = setup_post("2009-01-27-category.textile") + post = setup_post("2009-01-27-category.markdown") assert post.categories.include?('foo') end should "recognize several categories in yaml" do - post = setup_post("2009-01-27-categories.textile") + post = setup_post("2009-01-27-categories.markdown") assert post.categories.include?('foo') assert post.categories.include?('bar') assert post.categories.include?('baz') end should "recognize empty category in yaml" do - post = setup_post("2009-01-27-empty-category.textile") + post = setup_post("2009-01-27-empty-category.markdown") assert_equal [], post.categories end should "recognize empty categories in yaml" do - post = setup_post("2009-01-27-empty-categories.textile") + post = setup_post("2009-01-27-empty-categories.markdown") assert_equal [], post.categories end should "recognize number category in yaml" do - post = setup_post("2013-05-10-number-category.textile") + post = setup_post("2013-05-10-number-category.markdown") assert post.categories.include?('2013') assert !post.categories.include?(2013) end @@ -564,34 +564,34 @@ def do_render(post) end should "recognize tag in yaml" do - post = setup_post("2009-05-18-tag.textile") + post = setup_post("2009-05-18-tag.markdown") assert post.tags.include?('code') end should "recognize tags in yaml" do - post = setup_post("2009-05-18-tags.textile") + post = setup_post("2009-05-18-tags.markdown") assert post.tags.include?('food') assert post.tags.include?('cooking') assert post.tags.include?('pizza') end should "recognize empty tag in yaml" do - post = setup_post("2009-05-18-empty-tag.textile") + post = setup_post("2009-05-18-empty-tag.markdown") assert_equal [], post.tags end should "recognize empty tags in yaml" do - post = setup_post("2009-05-18-empty-tags.textile") + post = setup_post("2009-05-18-empty-tags.markdown") assert_equal [], post.tags end should "allow no yaml" do - post = setup_post("2009-06-22-no-yaml.textile") + post = setup_post("2009-06-22-no-yaml.markdown") assert_equal "No YAML.", post.content end should "allow empty yaml" do - post = setup_post("2009-06-22-empty-yaml.textile") + post = setup_post("2009-06-22-empty-yaml.markdown") assert_equal "Empty YAML.", post.content end @@ -691,7 +691,7 @@ def do_render(post) end should "generate categories and topics" do - post = Post.new(@site, File.join(File.dirname(__FILE__), *%w[source]), 'foo', 'bar/2008-12-12-topical-post.textile') + post = Post.new(@site, File.join(File.dirname(__FILE__), *%w[source]), 'foo', 'bar/2008-12-12-topical-post.markdown') assert_equal ['foo'], post.categories end end @@ -756,12 +756,12 @@ def do_render(post) end should "return category if post does not specify category" do - post = setup_post("2009-01-27-no-category.textile") + post = setup_post("2009-01-27-no-category.markdown") assert post.categories.include?('article'), "Expected post.categories to include 'article' but did not." end should "override site category if set on post" do - post = setup_post("2009-01-27-category.textile") + post = setup_post("2009-01-27-category.markdown") assert post.categories.include?('foo'), "Expected post.categories to include 'foo' but did not." assert !post.categories.include?('article'), "Did not expect post.categories to include 'article' but it did." end @@ -779,12 +779,12 @@ def do_render(post) end should "return categories if post does not specify categories" do - post = setup_post("2009-01-27-no-category.textile") + post = setup_post("2009-01-27-no-category.markdown") assert post.categories.include?('article'), "Expected post.categories to include 'article' but did not." end should "override site categories if set on post" do - post = setup_post("2009-01-27-categories.textile") + post = setup_post("2009-01-27-categories.markdown") ['foo', 'bar', 'baz'].each do |category| assert post.categories.include?(category), "Expected post.categories to include '#{category}' but did not." end