summaryrefslogtreecommitdiff
path: root/test/options_test.rb
AgeCommit message (Collapse)Author
2023-04-15resolves #4425 don't split value of -r CLI option (PR #4432)Dan Allen
2022-09-10resolves #4351 force encoding of attribute data passed via CLI to UTF-8 if ↵Dan Allen
transcoding fails (PR #4354)
2022-01-11don't overqualify types in test suiteDan Allen
2021-11-01resolves #3868 add --log-level option to CLI to control log level (PR #4198)Dan Allen
2021-10-30allow --failure-level option to be set to default value, FATAL, and update ↵Dan Allen
description in help
2021-08-28resolves #3569 add sourcemap option to the CLI (PR #3568)hackingotter
2021-07-31omit_parentheses where possible in test codeDan Allen
2021-06-05consistently use %w to create string arraysDan Allen
2021-05-31use appropriate assertions in test suiteDan Allen
- assert_equal instead of == - assert instead of assert_equal true - refute instead of assert_equal false - specify literal value as first argument to assert_equal
2021-05-28remove extra empty lines and empty blocks in test suiteDan Allen
2021-05-27disable interpolation in test suite when not needed [skip ci]Dan Allen
2021-05-27use $: shorthand instead of $LOAD_PATH in test suiteDan Allen
2021-05-27remove or mark unused block arguments in test suite; fix missing logger ↵Dan Allen
assertions
2021-05-22resolves #4065 show safe modes in strictness order in CLI help (PR #4067)Dan Allen
2021-05-03use -e in CLI tests instead of -s; include tests that verify the legacy aliasDan Allen
2021-04-30leave empty line after magic comment [skip ci]Dan 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-23resolves #1573 add syntax help to CLIGuillaume Grossetie
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-09resolves #3030 separate the -v and -w CLI flagsDan Allen
- use -v to set logger level to debug - use -w to enable pedantic Ruby warnings (aka $VERBOSE = true)
2019-01-12resolves #2997 ignore attribute CLI option if value is empty or equal sign ↵Dan Allen
(PR #3004)
2019-01-06use .adoc as AsciiDoc file extension in test suiteDan Allen
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-04-20resolves #2003 allow failure level to be specified using CLI option (PR #2674)Dan Allen
- add option to CLI to specify a failure level (--failure-level=LEVEL) - if this level is reached by a log message, it triggers a non-zero exit code
2018-04-13Allow tests to run outside of the gem context with the manpage help topic ↵Joseph Herlant
(#2653) * use manpage from environment variable * extract contents if path ends with .gz
2017-09-22use assert_kind_of in place of assert ... is_a? in test suiteDan Allen
2017-07-09resolves #2302 dump man page when help topic is manpage (PR #2303)Dan Allen
- add topic argument to -h flag of CLI - dump man page when help topic is manpage - update usage and man page to reflect new capability of -h flag - regenerate man page - add tests
2014-12-20resolves #405 - add attribute to control which substitutions are performed ↵Guillaume Grossetie
on docinfo files - add docinfosubs attribute to control substitutions performed on docinfo files - don't parse attribute option to cli as an array (interfers with docinfosubs value) - add method to resolve docinfosubs - add tests for docinfosubs attribute
2014-11-22fix broken test on WindowsDan Allen
2014-09-18resolves #1097 accept safe mode value in lowercase in cli, add testDan Allen
2014-08-04follow-up to #574 support multiple values in single -r or -I flagDan Allen
2014-05-19resolves #909 - add -t flag to cli to control output of timing informationGuillaume Grossetie
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-17resolves #574 add -r and -I flags to asciidoctor commandDan Allen
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-11-03resolves #557 add flag to cli to suppress warningsDan Allen
2013-07-01code revisionsDan Allen
- apply conventions - use optimizations - fix warnings - use helper method for cloning options
2013-06-30resolves issue #227 by accepting multiple files as input in CLI interfaceAlex Soto
2013-06-20resolves #437 allow multiple template directories to be specifiedDan Allen
2013-06-20resolves #406 add option to cli to specify template engineDan Allen
2013-05-23resolves #328 support for inline renderingDan Allen
2013-05-15Fixes #320LightGuard
I had to make one test change which was expecting an invalid backend, which no longer happens with this change, modified it to use -d instead. Also changed the text for -b in options.
2013-05-13Adding a missing test for #291LightGuard
You already had this fixed, though you didn't have a test that covered it in options
2013-02-02change failure to warning when extra args detectedDan Allen
2013-02-02resolve issue #152 print message for failed argDan Allen
2013-01-23resolve issue #97, add support for name=value@ attribute syntaxDan Allen
- also change default attribute value from 1 to empty string in cli options
2013-01-22enhance invoker, add tests, enforce securityDan Allen
- provide access to document after invoker runs for testing - add stream redirection to invoker - add exit code to invoker rather than using a hard exit - check that input file exists in options - set outfile on document after rendering for access in tests - add support for stdin - fix doc info attribute assignments, only set when input is a file - clarify the purpose of base_dir and docdir, respectively - use base_dir in normalize_asset_path - don't allow document to emit docdir or absolute docfile in secure mode - don't allow document to change doctype in secure mode - cleanup the option descriptions - add a --safe flag which is compatible with asciidoc - take out rubygems require (that should be handled by rubygems) - fix incorrect minute field in time format - loads of invoker tests - test for input file with spaces - additional helper methods for testing invoker - rename option_tests.rb to options_test.rb - add timings to cli - fix bug of not carrying over safe level in nested document