summaryrefslogtreecommitdiff
path: root/test/test_helper.rb
AgeCommit message (Collapse)Author
2023-04-16upgrade JRuby in CI workflowDan Allen
2023-04-08resolves #4429 add support for Haml 6 to template converter (PR #4431)Dan Allen
2022-10-24remove more outdated workarounds in test suite for JRubyDan Allen
2022-10-18remove workarounds for JRuby 9.1 in test suiteDan Allen
2021-12-29enhance using_test_webserver to track requests and pass host and thread to ↵Dan Allen
callback
2021-12-27resolves #4227 fix open-uri-cached integration on Ruby 3.1 (PR #4228)Dan Allen
2021-12-27add tests for open-uri/cached integration that is activated by the cache-uri ↵Dan Allen
attribute
2021-07-31omit_parentheses where possible in test codeDan Allen
2021-07-31resolves #2557 enable RuboCop to enforce a consistent code style and perform ↵Dan Allen
static analysis
2021-05-29simplify parse_header_metadata helper to a single return valueDan Allen
2021-05-28replace reduce with each_with_object in test suite [skip ci]Dan Allen
2021-05-28remove redundant do on until loop in test suite [skip ci]Dan Allen
2021-05-27use negated match operator instead of negating a positive match in test suiteDan Allen
2021-05-27disable interpolation in test suite when not needed [skip ci]Dan Allen
2021-05-27fix spaces and indentation in test suiteDan Allen
2021-04-30leave empty line after magic comment [skip ci]Dan Allen
2021-04-27fix invoker tests that use run_command on JRuby 9.1 for Windows (PR #4042)Dan Allen
2021-04-15resolves #3550 run tests on JRuby for Windows in CI (PR #3841)Dan Allen
* run tests on JRuby 9.1 and 9.2 for Windows in CI * don't run Pygments tests on JRuby 9.1 for Windows * exclude tests that use run_command on JRuby 9.1 for Windows * ensure mtime of input file honors TZ environment variable on JRuby for Windows
2021-04-15fix error in logic when modifying ENV for CI tests on JRubyDan Allen
2020-11-09add if and unless conditions to tests to make filtering more readable (PR #3844)Dan Allen
- also define windows? as static method for these cases - don't match darwin when detecting Windows
2020-11-03use match? in test helpersDan Allen
2020-02-20fix tests on JRuby 9.2.10.0Dan Allen
2020-02-19disable bundler in the pure CLI tests (PR #3577)Dan Allen
- switch to array-based arguments to prevent the command from being modified - disable the RUBYOPT environment variable unless the use_bundler option is enabled
2019-06-15resolves #3336 fix how options are passed to the Rouge lexer (PR #3339)Dan Allen
* restore compatibility with Rouge >= 3.4 * eagerly instantiate lexer if not using find_fancy * pass options to constructor of Rouge lexer instead of #lex method * don't clobber cgi-style options on language when enabling start_inline option on the Rouge PHP lexer * add tests for passing options to the Rouge lexer * upgrade Rouge to 3.4.0 (for development); also test against Rouge 2.0.7 in CI
2019-04-04resolves #3238 don't fail to load application if call to Dir.home fails (PR ↵Dan Allen
#3239)
2019-04-02document the popen workaround in the test suite for JRuby [skip ci]Dan Allen
2019-04-01use IO.popen with env argument in test suite (PR #3229)Dan Allen
2019-03-29use file read mode in test suiteDan Allen
2019-03-22define assert and refute include method in test suiteDan Allen
- define assert_include to accept a single expectation; reverse order from assert_includes - define refute_include to accept a single un-expectation; reverse order from refute_includes
2019-03-15format test helper codeDan 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-03-01resovles #3092 log debug message instead of warning if block style is ↵Dan Allen
unknown (PR #3097) - log debug message instead of warning if block style is unknown - log debug message if block macro name is unknown
2019-02-14document assertion workaround for nokogiri on JRuby [skip ci]Dan Allen
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-09log possible invalid reference warnings at debug levelDan Allen
2019-02-04parse XML as document if string starts with XML directiveDan Allen
2019-02-04use do..end syntax for multiline blocks in test suiteDan Allen
2019-02-03require rouge eagerly to suppress warningsDan Allen
2019-01-23resolves #2995 use methods on File class instead of IO class (PR #2999)Dan Allen
2019-01-08shut down the test webserver cleanly (PR #3001)Dan Allen
2019-01-07stop the TCPServer from whining about shutting downDan Allen
2019-01-06use .adoc as AsciiDoc file extension in test suiteDan Allen
2019-01-06modernize UTF-8 encoding operationsDan Allen
- encode strings to UTF-8 properly instead of force encoding - remove FORCE_ENCODING constant - use File.open to read include files - use OpenURI.open_uri to read URIs (instead of Kernel.open) - define constants for file and URI read and write modes (FILE_READ_MODE, URI_READ_MODE, and FILE_WRITE_MODE) - read files and URIs using the rb:utf-8 mode (except on Opal, drop the binary and encoding flags) - write files using the w:utf-8 mode (except on Opal, drop the encoding flag) - use byteslice instead of slice to remove BOM from string - remove valid_encoding? workaround for JRuby 1.7
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-27clean up test that executes asciidoctor CLIDan Allen
- configure open3 to autoload - use block form of popen3 to ensure streams are closed - minor cleanups
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-05-06Allow the lib dir to be overridden for tests using an environment variable ↵Joseph Herlant
(PR #2758) * allow the ASCIIDOCTOR_LIB_DIR environment variable to override location of the lib dir in test suite
2018-04-28match tag directives in include files that have CRLF line endings (see #2369)Dan Allen
2018-04-26only validate xrefs if $VERBOSE is truthyDan Allen
- validate xrefs based on $VERBOSE rather than logger level