Решение на Пета задача от Васил Гочев
Обратно към всички решения
Към профила на Васил Гочев
Резултати
- 4 точки от тестове
- 0 бонус точки
- 4 точки общо
- 27 успешни тест(а)
- 30 неуспешни тест(а)
Код
Лог от изпълнението
.......F......F....FFFFF..FFFFFFFF.FFF.FFFFF..F.FFFFF...F
Failures:
1) Formatter headers renders tricky ones
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<h2>Leading wsp</h2>"
got: "<p>## Leading wsp</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:665:in `block in expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `each'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:106:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
2) Formatter code blocks renders properly a longer example with tabs and Unicode
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<pre><code>// \u041F\u0440\u0438\u043C\u0435\u0440 \u0437\u0430 \u0431\u043B\u043E\u043A \u0441 \u043A\u043E\u0434.\n// \u0412 \u043D\u0435\u0433\u043E \u0432\u0441\u0435\u043A\u0438 \u0440\u0435\u0434, \u0434\u043E\u0440\u0438 \u043F\u0440\u0430\u0437\u043D\u0438\u0442\u0435, \u0435 \u043F\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0430\u043D \u043E\u0442 \u0442\u043E\u0447\u043D\u043E \u0447\u0435\u0442\u0438\u0440\u0438 \u0438\u043D\u0442\u0435\u0440\u0432\u0430\u043B\u0430.\ninclude <stdio.h>\n\nint main(int, char**) {\n\t// Whitespace \u0441\u043B\u0435\u0434 \u0447\u0435\u0442\u0438\u0440\u0438\u0442\u0435 \u0437\u0430\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u0438 \u0438\u043D\u0442\u0435\u0440\u0432\u0430\u043B\u0430 \u0432 \u043D\u0430\u0447\u0430\u043B\u043E\u0442\u043E, \u0441\u0435 \u0437\u0430\u043F\u0430\u0437\u0432\u0430 \u0432\u0438\u043D\u0430\u0433\u0438.\n\treturn 42;\n}</code></pre>"
got: "<pre><code>// \u041F\u0440\u0438\u043C\u0435\u0440 \u0437\u0430 \u0431\u043B\u043E\u043A \u0441 \u043A\u043E\u0434.\n// \u0412 \u043D\u0435\u0433\u043E \u0432\u0441\u0435\u043A\u0438 \u0440\u0435\u0434, \u0434\u043E\u0440\u0438 \u043F\u0440\u0430\u0437\u043D\u0438\u0442\u0435, \u0435 \u043F\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0430\u043D \u043E\u0442 \u0442\u043E\u0447\u043D\u043E \u0447\u0435\u0442\u0438\u0440\u0438 \u0438\u043D\u0442\u0435\u0440\u0432\u0430\u043B\u0430.\ninclude <stdio.h>\n\nint main(int, char**) {\n// Whitespace \u0441\u043B\u0435\u0434 \u0447\u0435\u0442\u0438\u0440\u0438\u0442\u0435 \u0437\u0430\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u0438 \u0438\u043D\u0442\u0435\u0440\u0432\u0430\u043B\u0430 \u0432 \u043D\u0430\u0447\u0430\u043B\u043E\u0442\u043E, \u0441\u0435 \u0437\u0430\u043F\u0430\u0437\u0432\u0430 \u0432\u0438\u043D\u0430\u0433\u0438.\nreturn 42;\n}</code></pre>"
(compared using ==)
Diff:
@@ -3,7 +3,7 @@
include <stdio.h>
int main(int, char**) {
- // Whitespace след четирите задължителни интервала в началото, се запазва винаги.
- return 42;
+// Whitespace след четирите задължителни интервала в началото, се запазва винаги.
+return 42;
}</code></pre>
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:186:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
3) Formatter blockquotes renders multiline ones with multiple paragraphs
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<blockquote><p>First quote.</p>\n\n<p>Second quote.</p></blockquote>"
got: "<blockquote><p>First quote.\n\nSecond quote.</p></blockquote>"
(compared using ==)
Diff:
@@ -1,4 +1,4 @@
-<blockquote><p>First quote.</p>
+<blockquote><p>First quote.
-<p>Second quote.</p></blockquote>
+Second quote.</p></blockquote>
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:268:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
4) Formatter blockquotes escapes special entities
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<blockquote><p>Cuttin & Pastin, w/o Quotin (")</p></blockquote>"
got: "<blockquote><p>Cuttin & Pastin, w/o Quotin (\")</p></blockquote>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:272:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
5) Formatter links renders simple links
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<p><a href=\"http://fmi.ruby.bg/\">Programming in Ruby</a></p>"
got: "<p>[Programming in Ruby](http://fmi.ruby.bg/)</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:278:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
6) Formatter links renders properly Unicode ones
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
Encoding::CompatibilityError:
incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `heading?'
# /tmp/d20111129-16859-1f1db6i/solution.rb:53:in `check_line'
# /tmp/d20111129-16859-1f1db6i/solution.rb:47:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `init_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:187:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:282:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
7) Formatter links allows multiple links on a single line
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<p>We have <a href=\"some-url\">a first</a> and <a href=\"another-url\">Second</a>.</p>"
got: "<p>We have [a first](some-url) and [Second](another-url).</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:286:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
8) Formatter links escapes special entities in the link description
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<p>Also testing <a href=\"here\">special & "entities" <b></a>.</p>"
got: "<p>Also testing [special & "entities" <b>](here).</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:304:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
9) Formatter links escapes special entities in the link URL
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<p>Or <a href=\"special & "entities" <b>\">what if</a> are in the URL, eh?</p>"
got: "<p>Or [what if](special & "entities" <b>) are in the URL, eh?</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:309:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
10) Formatter lists renders simple unordered lists
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
Encoding::CompatibilityError:
incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `heading?'
# /tmp/d20111129-16859-1f1db6i/solution.rb:53:in `check_line'
# /tmp/d20111129-16859-1f1db6i/solution.rb:47:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `init_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:187:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:330:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
11) Formatter lists renders simple ordered lists
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
Encoding::CompatibilityError:
incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `heading?'
# /tmp/d20111129-16859-1f1db6i/solution.rb:53:in `check_line'
# /tmp/d20111129-16859-1f1db6i/solution.rb:47:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `init_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:187:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:348:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
12) Formatter lists renders lists with a single item
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
TypeError:
can't convert nil into String
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `+'
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:362:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
13) Formatter lists does not choke on malformed lists
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
Encoding::CompatibilityError:
incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `heading?'
# /tmp/d20111129-16859-1f1db6i/solution.rb:53:in `check_line'
# /tmp/d20111129-16859-1f1db6i/solution.rb:47:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `init_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:187:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:394:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
14) Formatter lists escapes special entities in the list elements
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
TypeError:
can't convert nil into String
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `+'
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:410:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
15) Formatter lists allows links in list elements
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
TypeError:
can't convert nil into String
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `+'
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:424:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
16) Formatter bold and italic text rendering allows multiple ones per line
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<p>Some <em>more words here</em> <em>to be</em> <strong>emphasized</strong>, okay?</p>"
got: "<p>Some <em>more words here_ _to be</em> <strong>emphasized</strong>, okay?</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:438:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
17) Formatter bold and italic text rendering works in headers
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<h1><em>Simplest</em> case</h1>"
got: "<p># <em>Simplest</em> case</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:665:in `block in expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `each'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:447:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
18) Formatter bold and italic text rendering works in blockquotes
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<blockquote><p><em>Simplest</em> case</p></blockquote>"
got: "<blockquote><p>_Simplest_ case</p></blockquote>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:665:in `block in expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `each'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:455:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
19) Formatter bold and italic text rendering works in links
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<p>Some <a href=\"okay\"><em>more words here</em> <em>to be</em> <strong>emphasized</strong></a>?</p>"
got: "<p>Some [<em>more words here_ _to be</em> <strong>emphasized</strong>](okay)?</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:464:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
20) Formatter bold and italic text rendering works in list elements
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
TypeError:
can't convert nil into String
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `+'
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:476:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
21) Formatter bold and italic text rendering works in links in list elements
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
TypeError:
can't convert nil into String
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `+'
# /tmp/d20111129-16859-1f1db6i/solution.rb:259:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:487:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
22) Formatter bold and italic text rendering does not brake HTML entities inside it
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<p>Some <em>more & words</em> <em>to be</em> <strong>"emphasized"</strong>!</p>"
got: "<p>Some <em>more & words_ _to be</em> <strong>"emphasized"</strong>!</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:491:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
23) Formatter bold and italic text rendering does not allow parial overlapping
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<p>Some <em>more words **to be</em> emphasized**!</p>"
got: "<p>Some <em>more words <strong>to be</em> emphasized</strong>!</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:496:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
24) Formatter special entities escapes them in headers
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<h2>"Black & Decker"!</h2>"
got: "<p>## "Black & Decker"!</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:665:in `block in expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `each'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:518:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
25) Formatter special entities escapes them in blockquotes
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<blockquote><p>"Black & Decker"!</p></blockquote>"
got: "<blockquote><p>\"Black & Decker\"!</p></blockquote>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:665:in `block in expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `each'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:530:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
26) Formatter special entities escapes them in deeply-nested elements
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<h2><em>"Black & Decker"</em>!</h2>"
got: "<p>## <em>"Black & Decker"</em>!</p>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:665:in `block in expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `each'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:536:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
27) Formatter whitespace removes excess leading and trailing whitespace
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<p>Some txt</p>"
got: "\n\n<p>Some txt</p>"
(compared using ==)
Diff:
@@ -1,2 +1,4 @@
+
+
<p>Some txt</p>
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:665:in `block in expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `each'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:547:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
28) Formatter whitespace ignores leading and trailing whitespace of lines whenever possible
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<h1>Test with a header</h1>"
got: "<p># Test with a header</p>\n\n"
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-<h1>Test with a header</h1>
+<p># Test with a header</p>
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:665:in `block in expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `each'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:555:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
29) Formatter whitespace does not touch trailing whitespace in code blocks
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
expected: "<pre><code>Simple code blk </code></pre>"
got: "<pre><code>Simple code blk</code></pre>"
(compared using ==)
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:665:in `block in expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `each'
# /tmp/d20111129-16859-1f1db6i/spec.rb:664:in `expect_transformations'
# /tmp/d20111129-16859-1f1db6i/spec.rb:563:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
30) Formatter mixed, complex input renders properly
Failure/Error: Formatter.new(plain).to_html.should eq formatted.strip
Encoding::CompatibilityError:
incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `match'
# /tmp/d20111129-16859-1f1db6i/solution.rb:66:in `heading?'
# /tmp/d20111129-16859-1f1db6i/solution.rb:53:in `check_line'
# /tmp/d20111129-16859-1f1db6i/solution.rb:47:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:198:in `init_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:187:in `initialize'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `new'
# /tmp/d20111129-16859-1f1db6i/solution.rb:258:in `block in iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `each_index'
# /tmp/d20111129-16859-1f1db6i/solution.rb:257:in `iterate_lines'
# /tmp/d20111129-16859-1f1db6i/solution.rb:251:in `to_html'
# /tmp/d20111129-16859-1f1db6i/spec.rb:660:in `expect_transformation'
# /tmp/d20111129-16859-1f1db6i/spec.rb:655:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/homework/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.61845 seconds
57 examples, 30 failures
Failed examples:
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:99 # Formatter headers renders tricky ones
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:163 # Formatter code blocks renders properly a longer example with tabs and Unicode
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:255 # Formatter blockquotes renders multiline ones with multiple paragraphs
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:271 # Formatter blockquotes escapes special entities
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:277 # Formatter links renders simple links
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:281 # Formatter links renders properly Unicode ones
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:285 # Formatter links allows multiple links on a single line
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:303 # Formatter links escapes special entities in the link description
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:308 # Formatter links escapes special entities in the link URL
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:315 # Formatter lists renders simple unordered lists
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:333 # Formatter lists renders simple ordered lists
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:351 # Formatter lists renders lists with a single item
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:377 # Formatter lists does not choke on malformed lists
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:397 # Formatter lists escapes special entities in the list elements
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:413 # Formatter lists allows links in list elements
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:437 # Formatter bold and italic text rendering allows multiple ones per line
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:442 # Formatter bold and italic text rendering works in headers
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:450 # Formatter bold and italic text rendering works in blockquotes
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:463 # Formatter bold and italic text rendering works in links
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:468 # Formatter bold and italic text rendering works in list elements
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:479 # Formatter bold and italic text rendering works in links in list elements
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:490 # Formatter bold and italic text rendering does not brake HTML entities inside it
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:495 # Formatter bold and italic text rendering does not allow parial overlapping
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:515 # Formatter special entities escapes them in headers
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:527 # Formatter special entities escapes them in blockquotes
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:533 # Formatter special entities escapes them in deeply-nested elements
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:541 # Formatter whitespace removes excess leading and trailing whitespace
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:550 # Formatter whitespace ignores leading and trailing whitespace of lines whenever possible
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:558 # Formatter whitespace does not touch trailing whitespace in code blocks
rspec /tmp/d20111129-16859-1f1db6i/spec.rb:586 # Formatter mixed, complex input renders properly
История (1 версия и 0 коментара)
Васил обнови решението на 23.11.2011 22:34 (преди почти 13 години)