summaryrefslogtreecommitdiff
path: root/test/text_test.rb
AgeCommit message (Collapse)Author
2021-07-31use single quoted string or use %() for interpolated string in test suiteDan Allen
2021-07-31omit_parentheses where possible in test codeDan Allen
2021-06-03use single level of indentation for method calls that wrap [skip ci]Dan Allen
2021-06-03use comma after last entry in multi-line array [skip ci]Dan Allen
2021-05-28remove excess empty lines in test suite; use multiple lines for class ↵Dan Allen
definitions [skip ci]
2021-05-25use single-quoted strings where possible in test suiteDan Allen
2021-04-30leave empty line after magic comment [skip ci]Dan Allen
2019-03-29use file read mode in test suiteDan Allen
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-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-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-02use indented heredoc in text_testDan 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-04-09delegate to test helper method to resolve test directory and fixture pathsDan Allen
2018-04-08purge render method from test suite (except to verify alias)Dan Allen
- replace use of render method with convert method
2017-07-22remove unnecessary nil_or_empty? checks in Substitutor; add missing testDan Allen
2017-05-28rename test helper method expand_entity to decode_charDan Allen
- rename expand_entity to decode_char - change pack 'U*' to pack 'U1' (since the method only accepts one number) - use decode_char in place of long-hand in some places
2017-04-28allow normalize option to be set on PreprocessorReader; change default to falseDan Allen
2017-03-05fix invalid grammar in test caseDan Allen
2014-07-30resolves #1046 use more concise curved quote syntaxDan Allen
2014-07-29replace smart quotes before monospace, be smarter about replacementsDan Allen
- replace ``phrase'' and `phrase' before ``monospace`` and `monospace` - disallow ` as first character of single-quoted phrase - disallow ` as first character or following character of an unconstrained monospace - update tests - add test for two double-quoted phrases in single line
2014-07-27resolves #718 and #714 swap + and ` formatting charsDan Allen
- change + to be constrained passthough (no monospaced formatting) * recognize role "x-" to reenable legacy behavior - change ++ to be unconstrained passthrough (no monospaced formatting, same as $$) * recognize role "x-" to reenable legacy behavior - add role to unconstrained passthroughs (except for pass:[] macro) - change ` to be constrained monospace (no passthrough behavior) - change `` to be unconstrained monospace (no passthrough behavior) - use compat-mode document attribute to reenable legacy behavior - update compat file for compatibility with AsciiDoc Python - update tests for both compatibility modes - fix marked text in compat file
2014-07-14resolves #717 disable single quotes as formatting marks for emphasized textDan Allen
- disable single quotes as emphasis formatting marks by default - introduce compat-mode document attribute to reenable legacy behavior - add compat_mode property to document to set compatibility mode - don't replace trailing single quote with right single smart quote - introduce `' as the formatting mark to make a right single quote (rsquo) - unescape escaped single quote explicitly - update compat file for AsciiDoc Python
2014-06-19resolves #929 only include xmlns in docbook45 backend if xmlns attribute is ↵Dan Allen
specified
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-16resolves #554 switch default docbook backend to docbook5brian m. carlson
- switch docbook backend to docbook5. - make tests for DocBook 4.5 specify the correct backend - update documentation to reflect new docbook backend
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
2014-02-05refactor unit tests so they work in RubyMineCharles Moulliard
- explicitly add the test and lib directory to the load path - switch to the project root before running tests - add UTF-8 encoding magic header to all test files - exclude .gem file at root of project (where RubyMine puts it) This commit was modified from the original pull request by @mojavelinux
2013-12-01add tests for formatting select Asian charactersDan Allen
2013-08-28rework #455 to pass Markdown horizontal rule testsDan Allen
2013-08-21resolves #575, #572 and #581 refactor reader to track include stackDan Allen
- split the Reader into Reader and PreprocessorReader - maintain an internal stack of include contexts - report file names with line numbers - rework reader tests - rename several reader methods to be more intuitive - optimize operations in the readers
2013-08-13add xmlns to root element in docbook45 backendDan Allen
2013-06-27resolves #455 add Markdown-style horizontal rules (w/ restriction)Dan Allen
2013-05-01resolves #308 set proper encoding on input dataDan Allen
- set constant that determines whether to force encoding - force encoding on all input data - test to verify input data is properly encoded - new rake task to run tests w/ US-ASCII default external encoding
2013-04-20resolves #260 use code element instead of ttDan Allen
- perform macro sustitution on email in document header
2013-01-30resolves issue #144 - encoding issue w/ utf-8Dan Allen
- needed to add magic encoding line to all erb templates - add example from issue to encodings test case
2013-01-03fix warningsDan Allen
2013-01-03remove string monkeypatching, process template class in rendererDan Allen
2013-01-03Add DocBook backend templates + loads of improvementsDan Allen
- make templates for docbook45 backend - move backend templates to backends/ folder - load backend templates lazily (based on backend attribute) - namespace backend templates to avoid conflicts - extend backend templates from a base template - add view property to template class - change InlineLink to InlineAnchor and assign type (:link or :xref) - simplify shorthand methods (e.g., define attribute) in template classes - set default backend to html5 - set backend attribute family (backend-*, basebackend, etc) - set docdate and doctime attributes (match local* w/o file ref) - prevent Reader from overriding attributes passed to Document.new - fix list continuation bug in outline and labeled lists - fold first paragraph properly in outline lists; document in TomDoc - add convenience methods to String (trim, nuke) - add TomDoc to methods added to String - add tests for String monkeypatches - fix compliance of attribute continuations in Reader - perform attribute substitutions on document attributes and attribute lists - apply normal subs to single-quoted attribute values - cleanup how substitutions are called - don't need Asciidoctor:: prefix in Substituter - honor line pass: macro in document attribute value - move regexs in Reader to Asciidoctor module - use %r{} syntax to make some regex easier to read - fix order of replacements - add ellipsis and single quote replacements - add space, quot and apos to instrinsics - move Substituters mixin to AbstractBlock - make Document an AbstractBlock - use blocks instance variable in Document instead of elements - document should store text of reference to match how docbook works - allow Document.new to be called w/ no arguments - rename level* regex to section* - loads of tests to verify numerous compliance checks and for new functionality - more TomDoc
2012-12-31overhaul of inline text parsing & substitutionsDan Allen
- death to htmlify, no more hardcoded html! inline text is rendered using templates - create a common parent AbstractNode for all structured elements - create a common parent AbstractBlock for section, block and list item - create an Inline element for inline rendering - correct quoted text substitutions to be fully compliant w/ AsciiDoc - implement inline image macro - implement inline passthrough macros (using extract & restore) - add template for line break & callout - add replacements substitution (for symbols like copyright, trademark, etc) - substitute attributes in attribute values - pull regexs for inline parsing into Asciidoctor module - more robust regex for anchors and attribute lines - double-line heading should not be allowed to start w/ a dot - load tilt lazily (don't need to load if using built-in templates) - remove import of unused cgi library - optimized some regexs - lots 'o tests - more TomDoc
2012-12-20add wrapper for embedded doc (no header/footer) & encoding testDan Allen
2012-12-20set encoding document template to utf8 and test itDan Allen
2012-12-13make header/footer optional, set intrinsic attributesDan Allen
- make header/footer optional using option :header_footer - set intrinsic attributes such as date/time, doctype and asciidoctor version - expose doctitle and title accessors in Document (preferred over header) - fill in the template for Document more completely to be consistent w/ AsciiDoc
2012-12-11restore escaped single quote after processing emphasisDan Allen
2012-12-11allow quoted text to be at start or end of lineDan Allen
2012-12-11horizontal ruler only needs to be three quotesDan Allen