summaryrefslogtreecommitdiff
path: root/test/attributes_test.rb
AgeCommit message (Collapse)Author
2021-12-23Fix typos and misspellings in docs and code (PR #4222)Kian Meng, Ang
2021-10-10resolves #4147 disallow the use of dot in the name of a named element ↵Dan Allen
attribute (PR #4148)
2021-07-31omit_parentheses where possible in test codeDan Allen
2021-06-05consistently use %w to create string arraysDan Allen
2021-05-31use assert_empty/refute_empty where possible in test suiteDan Allen
2021-05-29pass method reference to rstrip lines of output in test suiteDan Allen
2021-05-28remove excess empty lines in test suite; use multiple lines for class ↵Dan Allen
definitions [skip ci]
2021-05-28remove extra empty lines and empty blocks in test suiteDan Allen
2021-05-27use modern Hash syntax in test suite [skip ci]Dan Allen
2021-05-25use single-quoted strings where possible in test suiteDan Allen
2021-04-30leave empty line after magic comment [skip ci]Dan Allen
2021-04-19resolves #3732 allow value of user-home attribute to be overridden by API or ↵Dan Allen
CLI (PR #4030)
2021-04-17fix references to AsciiDoc.py in code comments [skip ci]Dan Allen
2021-04-14resolves #4013 increment counter (but not the corresponding attribute) if ↵Dan Allen
attribute is locked (PR #4015)
2021-04-14verify attribute entry can advance counterDan Allen
2021-04-09resolves #3940 fix crash when resolving next value in sequence for ↵Dan Allen
non-numeric counter (PR #4003)
2021-04-09resolves #3939 counter and counter2 directives in attribute reference should ↵Guillaume Grossetie
not modify locked attributes (PR #3944)
2020-10-31resolves #3614 add role setter method on AbstractNode (PR #3811)Dan Allen
2019-03-19resolves #2861 log dropped lines at info level when ↵Dan Allen
attribute-missing=drop-line (PR #3170)
2019-03-14resolves #1444 rename header_footer option to standalone (PR #3146)Dan Allen
* still honor header_footer option as fallback for backwards compatibility
2019-03-12add additional tests for #2191Dan Allen
2019-03-11upgrade truffleruby to 1.0.0-rc13 (PR #3043)Dan Allen
2019-02-10resolves #3059 change default value of fallback attribute name on attr/attr? ↵Dan Allen
to nil (PR #3063) - change default value of fallback attribute name on attr/attr? to nil - if fallback attribute name is true, look for same attribute on document - look for table-frame, table-grid, and table-stripes attributes on document as fallback fro frame, grid, and stripes on table
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-10resolves #1934 use third argument to attr/attr? to specify the fallback ↵Dan Allen
attribute name (PR #2940)
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-07resolves #1944 disable role inheritance (PR #3050)Dan Allen
- scope the role attribute to the block - use attr/attr? to look up role with inheritance if necessary - set role on document using role attribute instead of docrole attribute
2019-02-05resolves #3005 remove the converter for the docbook45 backend (PR #3040)Dan Allen
- remove the DocBook45Converter class - remove accomodations in DocBook5Converter for DocBook 4.5 - don't register the docbook45 backend name in the converter registry - drop docbook45 from the backend CLI option values - don't mention DocBook 4.5 in the man page - don't mention DocBook 4.5 in the CLI usage statement - update tests to use DocBook 5 instead of DocBook 4.5
2019-02-02clarify encoding workaround in test suite for trufflerubyDan Allen
2019-02-02fix tests on trufflerubyDan Allen
2019-02-01use strict indented heredoc in attributes_testDan Allen
2019-01-24document when workarounds can be removed [skip ci]Dan Allen
2019-01-19add truffleruby to CI matrix (PR #3026)Dan Allen
2019-01-18use do..end for multi-line blocks (even when chained)Dan Allen
2019-01-06use .adoc as AsciiDoc file extension in test suiteDan 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-09-11replace the use of render with convert in test suiteDan Allen
- rename render_string to convert_string - rename render_embedded_string to convert_string_to_embedded - rename render_inline_string to convert_inline_string - use convert_inline_string where :doctype was being set to :inline
2018-09-09process !name@ syntax propertyDan Allen
- remove both leading and trailing modifiers from attribute name - add test to verify behavior
2018-04-30refactor sub_attributes (PR #2300)Dan Allen
- use single gsub pass - remove dropped lines, if any, in post-processing step - cache compliance values correctly - optimize for single-line case - add missing guards to check for attribute reference head
2018-04-23use cursor marks to track line numbers more accurately and efficientlyDan Allen
- add Reader#mark method to mark position of cursor (store internally) - add Reader#cursor_at_mark method to build Cursor from previously saved mark - mark position of cursor after reading block attribute lines in Parser.next_block - use Reader#cursor_at_mark to retrieve/record source location in Parser.next_block - add cursor option to Reader#read_lines_until so unterminated block warning reports start location of block - allow value of cursor option passed to Reader#read_lines_until to be :at_mark to read cursor from mark - update test assertions
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
2018-04-15resolves #1133 show error if delimited block is not terminatedDan Allen
2018-04-14use helpers to assert log messages in testsDan Allen
- add assert_message helper for asserting a single message - add assert_messages helper for asserting multiple messages - rewrite paths and reader tests to assert log messages instead of stderr stream - assert message about illegal reference to parent is only reported on first violation when resolving system path - use instance variable to store shared logger in tests
2018-04-14promote MemoryLogger and NullLogger to Asciidoctor moduleDan Allen
2018-04-14update tests to use memory logger instead of capturing stderrDan Allen
- use memory logger in some of the tests instead of capturing messages from stderr - add test to verify basic formatter includes progname and source location in printed message
2018-04-13resolves #642 allow attribute to be soft unset from API or CLI (PR #2649)Dan Allen
- support name!@, !name@, name!=@, and !name=@ syntax to soft unset attribute - interpret false attribute value from API as soft unset - allow modifier to be placed at end of name to soft set an attribute (e.g., icons@=font) - add tests for all permutations of setting attributes from API - minor refactoring
2018-04-08purge render method from test suite (except to verify alias)Dan Allen
- replace use of render method with convert method
2017-11-12fix warnings in test suiteDan Allen
- replace assert_equal nil with assert_nil