summaryrefslogtreecommitdiff
path: root/test/parser_test.rb
AgeCommit message (Collapse)Author
2022-10-24remove outdated workaround in test suite for JRuby heredoc bugDan Allen
2021-11-13fix lint errorDan Allen
2021-11-13add flag to suppress retrieving metadata from parse_header_metadata; include ↵Dan Allen
metadata from author overrides
2021-11-12verify authors attribute is only parsed if different from computed value of ↵Dan Allen
implicit authors
2021-07-31omit_parentheses where possible in test codeDan Allen
2021-05-29simplify parse_header_metadata helper to a single return valueDan Allen
2021-05-25use single-quoted strings where possible in test suiteDan Allen
2021-05-25use key? instead of has_key? in tests [skip ci]Dan Allen
2021-04-30leave empty line after magic comment [skip ci]Dan Allen
2019-03-21resolves #2441 substitute replacements in author values used in document ↵Dan Allen
header (PR #3182) - substitute replacements in author values used in document header - require space after semi-colon that separates multiple authors
2019-02-15clean up newline handling in test suite (PR #3074)Dan Allen
- use chop instead of chomp to remove trailing newline from heredoc string - document all uses of non-quoted squiggly heredoc to preserve indentation - fix incorrect preparation of uniform indentation in list tests - remove unnecessary uses of chomp
2019-02-10resolves #3054 never mutate strings; add `frozen_string_literal: true` ↵Dan Allen
comment to source files (PR #3055) - replace gsub! and sub! with gsub and sub, respectively - add `frozen_string_literal: true` magic comment to all Ruby source files - see https://www.mikeperham.com/2018/02/28/ruby-optimization-with-one-magic-comment/
2019-02-08resolves #3051 drop the options attributeDan Allen
- don't store the options attribute on the block once the options are parsed - only store options as individual attributes (e.g., header-option) - add an options method on AbstractNode to retrieve the set of option names - store partial-option as empty string instead of true - reference low-level option attribute internally
2019-02-02add reference in test suite to JRuby heredoc issue [skip ci]Dan Allen
2019-02-02fix broken tests on JRubyDan Allen
- JRuby incorrectly drops all indentation in a squiggly heredoc when interpolation is disabled
2019-02-02use indented (squiggly) heredoc strings in parser_testDan Allen
2019-01-06switch to modern hash syntaxDan Allen
- switch to modern hash syntax (from :key => value to key: value) - put space inside hash brackets (from {key: value} to { key: value } - use dangling comma on last entry of multi-line hash
2019-01-06use require_relative instead of modifying $LOAD_PATHDan Allen
- use require_relative in place of require when it relied on $LOAD_PATH manipulation - configure bin scripts to work with require_relative - rename ROOT_PATH to ROOT_DIR - rename DATA_PATH to DATA_DIR - rename STYLESHEETS_DATA_PATH to STYLESHEETS_DIR - define LIB_DIR - simplify test helper require and setup - add bindir helper to test suite - remove unneeded constants in test helper - reorder autoload statements - require version directly instead of autoloading
2019-01-06remove workarounds for Ruby < 2.3Dan Allen
- remove constants for differentiating between Ruby versions - remove fallback assignment for RUBY_ENGINE constant - remove rubygems require - use unicode character properties in regular expressions (e.g., \p{Word}) - remove COERCE_ENCODING constant - always set FORCE_ENCODING constant to true unless default external encoding is not UTF-8 - remove workaround for computing line length - use lines method instead of lines.entries to get lines for string - always normalize lines - check if JRuby class is defined instead of checking for JRuby engine - remove global RUBY_ENGINE_JRUBY constant - move RUBY_ENGINE_OPAL constant inside Asciidoctor module - remove magic encoding comments (since default script encoding is UTF-8) - remove workaround when printing encoding information - remove fallback assignments for passthrough escape characters - remove Ruby core backports (only leave Asciidoctor-specific extensions) - use __dir__ instead of File.dirname __FILE__ - use Float#truncate to truncate column widths - override Float#truncate on Ruby 2.3 to implement precision argument - remove concurrent/hash backport - simplify class_for_name helper - don't call to_sym on constants returned from constants method - remove unnecessary aliasing of regexp match variables; use magic variable instead (e.g., m = $~) - remove workaround for sub_specialchars to accomodate gsub with map argument - remove comment about %:z placeholder for strftime - don't call .to_a on return value of Hash#keys - get home directory using Dir.home - remove exceptions and exclusions for Ruby < 2 in test suite - update list of supported Ruby engines and versions in READMEs - update ruby versions in run-tests.sh
2018-10-28resolves #669 allow authorinitials for single author to be overridden (PR #2943)Dan Allen
2018-10-27resolves #2769 report correct line number for inline anchor with id already ↵Dan Allen
in use (PR #2938)
2018-07-25move AttributeList tests to dedicated test fileDan Allen
2018-07-24treat empty value for named block attribute as empty stringDan Allen
2018-05-16resolves #2785 allow revnumber in revision line to be an attribute reference ↵Dan Allen
(PR #2786)
2018-04-19resolves #2174 shorthand attribute syntax no longer resets block styleDan Allen
- using the shorthand syntax to set block attributes (id, roles, options) doesn't reset block style - roles specified using shorthand syntax are additive - parse style attribute eagerly, after reading each block attribute line - simplify check for discrete heading
2017-12-26resolves #2519 set authorcount to 0 if there are no authors (PR #2520)Dan Allen
2017-12-18add test for uncovered line in Reader#skip_comment_linesDan Allen
2017-07-23use refute in place of assert ! in test suite (PR #2336)Dan Allen
- replace assert ! with refute - use assert_nil and refute_nil - use assert_empty and refute_empty - use assert_kind_of instead of direct is_a? call - use assert_respond_to instead of direct respond_to? call
2017-06-18change Parser.parse_style_attribute to only return parsed styleDan Allen
- only return parsed style (not original style) - update API docs for method - optimize method return; consolidate code
2017-06-05refactor Parser.store_attribute and related methods; add tests (PR #2239)Dan Allen
- refactor and optimize Parser.store_attribute method - add tests for Parser.store_attribute method - change return value of Document#set_attribute to resolved value - add return value to update backend/doctype methods on Document
2017-05-07resolves #2112 sanitize content of authors meta tag in HTML output (PR #2181)Dan Allen
- sanitize content of authors meta tag in HTML output - sanitize value of author and authors attribute before partitioning - consolidate author metadata assignment - add tests
2017-03-30resolves #663 don't mangle compound names when document has multiple authors ↵Dan Allen
(PR #2104) - when reparsing overrides; reconstruct compound names if necessary - add test for multiple authors with compound names
2017-03-18use delete instead of tr to remove spaces; optimize options parsing (PR #2088)Dan Allen
2017-02-28replace #split(' ') calls with #splitDan Allen
2016-11-28fix warnings; remove warn statement in test suiteDan Allen
2016-11-28add test for parsing author attributeDan Allen
2015-12-29remove trailing endlines in sourceDan Allen
2015-07-05resolves #1170 and #841 expand tabs properlyDan Allen
- introduce tabsize attribute to control size of tab character - expand tabs in verbatim blocks if tab present and value of tabsize attribute is positive - rename reset_block_indent! to adjust_indentation! - only use adjust_indentation! on include if indent is specified - only expand tabs in included content if indent attribute is set - use adjust_indentation! to remove left margin in paragraphs marked normal - don't add indentation to empty lines - set tab-size property to 4 in default stylesheet - increase letter spacing in blockquote cite in default stylesheet - add and fix tests
2015-05-21remove warn statement in test suiteDan Allen
2015-05-14resolves #790 parse isolated version in revision linebrian m. carlson
- parse revision line which only has version as revnumber - require version to begin with 'v' if date is absent in revision line
2014-05-16resolves #892 match word characters defined by UnicodeDan Allen
- replace \w with character class to match word characters as defined by Unicode - use Unicode match groups for Ruby >= 1.9.3 - rename regex character class constants - don't filter out word characters outside of ASCII range in section id - add tests for matching word characters outside of ASCII range - Opal compatibility fixes and cleanups
2014-04-08tests: switch to minitestKen Dreyer
Ruby 1.9+ uses Minitest as the backend for Test::Unit. As of Minitest 5, the shim no longer supports Test::Unit::TestCase. Adjust the test suite to support Minitest 5's syntax. Minitest versions 4 and below do not support the newer Minitest::Test class that arrived in version 5. For that case, use the MiniTest::Unit::TestCase class as a fallback.
2014-02-16call each thing by its right nameDan Allen
- rename Lexer to Parser - use dot notation instead of double colon notation for class methods