Skip to content

1.42: the test command's example of TASTYOPTS doesn't work #2386

Description

@simonmichael

hledger test -h suggests hledger test -- -pData.Amount --color=never as an example of passing options to the tasty test runner. This works with hledger 1.41:

$ hledger-1.41 test -- -pData.Amount --color=never
hledger
  Hledger
    Data
      Amount
        Amount
          amountCost:                                                                 OK
          amountLooksZero:                                                            OK
          negating amounts:                                                           OK
          adding amounts without costs:                                               OK
          showAmount:                                                                 OK
        MixedAmount
          comparing mixed amounts compares based on quantities:                       OK
          adding mixed amounts to zero, the commodity and amount style are preserved: OK
          adding mixed amounts with total costs:                                      OK
          showMixedAmount:                                                            OK
          showMixedAmountWithoutCost:                                                 OK
          amounts
            a missing amount overrides any other amounts:                             OK
            costless same-commodity amounts are combined:                             OK
            amounts with same unit cost are combined:                                 OK
            amounts with different unit costs are not combined:                       OK
            amounts with total costs are combined:                                    OK
          mixedAmountStripCosts:                                                      OK

All 16 tests passed (0.45s)

but is broken in hledger 1.42:

$ hledger-1.42.1 test -- -pData.Amount --color=never
Invalid option `-pData.Amount'

Usage: hledger-1.42.1 [(-p|--pattern PATTERN)] [-t|--timeout DURATION] 
                      [--hide-progress] [-l|--list-tests] 
                      [-j|--num-threads NUMBER] [-q|--quiet] [--hide-successes] 
                      [--min-duration-to-report DURATION] 
                      [--color never|always|auto] [--ansi-tricks ARG]

Also, it used to be easier to select a subset of tests, by providing simple arguments. Since about hledger 1.17 or so you have to use -- and know the tasty test runner's CLI. This command is not much used, but still.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.affects2-devsAffects packagers or developers.annoyance2-minorMinor to moderate usability/doc bug, reasonably easy to avoid or tolerate.docsDocumentation-related.regressionA backwards step, indicating a weakness in our QA. We don't like these.test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions