Skip to content
This repository was archived by the owner on Dec 29, 2021. It is now read-only.
This repository was archived by the owner on Dec 29, 2021. It is now read-only.

Future of assert_cli #41

Open
Open

Description

@killercup

@epage asked in #40 (comment):

I'm curious, what do you see needing done before moving this to 1.0? While I should get back to my regularly schedule project, I would like to also help work towards more crates hitting 1.0.

Good question! I'd like to make the arg parsing a bit leaner (cf. #25 and #32) and maybe improve the error output (#17, #18, #30).

My general goal is to make a library that makes writing tests like these easy and fun. It'll probably involve generating some test boilerplate code, and I'm not entirely sure what I want that API to look like. I'm not even sure if that's in scope for assert_cli. What do you think?

EDIT

The building blocks for assert_cli 1.0 are

Activity

  1. epage commented on Sep 27, 2017

    @epage
  2. killercup commented on Sep 27, 2017

    @killercup
    Author
  3. killercup commented on Sep 27, 2017

    @killercup
    CollaboratorAuthor

    Pinging some people who used assert_cli in their projects (found using Github search):

    We are thinking about doing a 1.0 release and would love to hear your opinion on the crate and ideas for its future!

    • @livioribeiro who used it for cargo-readme integration tests
    • @bjgill who updated cargo-edit to assert_cli 0.4
    • @mattgathu who quite recently used assert_cli in rget
    • @jxson who uses it in some tests of to-directory
  4. mattgathu commented on Oct 1, 2017

    @mattgathu
  5. mattgathu commented on Oct 1, 2017

    @mattgathu

    About future ideas, I have been wondering how feasible it is to test for colored output?

    If my CLI binary prints out colored text, can I test this?

    What are your thoughts on this.

  6. epage commented on Oct 2, 2017

    @epage
  7. epage commented on Oct 2, 2017

    @epage
    Collaborator

    About future ideas, I have been wondering how feasible it is to test for colored output? If my CLI binary prints out colored text, can I test this?

    Most programs detect if they are outputting to a console and don't print color if they are. Some have a "force color" option.

    So either we'd need to figure out how to fake being a console or clients need to have a force color option and set it.

    When forced, I assume color just shows up in stdout as weird characters. Can you just manually enter those characters in to test it? Do you have a proposal for what an API might look like for more advanced color testing?

  8. epage commented on Oct 12, 2017

    @epage
  9. killercup commented on Oct 12, 2017

    @killercup
    Author
  10. Freyskeyd commented on Oct 12, 2017

    @Freyskeyd
  11. epage commented on Oct 12, 2017

    @epage
  12. Freyskeyd commented on Oct 12, 2017

    @Freyskeyd
  13. epage commented on Oct 26, 2017

    @epage
  14. epage commented on Oct 26, 2017

    @epage
  15. killercup commented on Oct 26, 2017

    @killercup
    Author
  16. epage commented on Oct 26, 2017

    @epage
  17. epage commented on Oct 27, 2017

    @epage
  18. epage commented on May 29, 2018

    @epage
    Collaborator

    We've started the major shift to assert_cli 1.0. assert_cmd is the spiritual successor to what assert_cli today. We plan to turn assert_cli into a higher level CLI testing crate like waltz tests.

    The building blocks for assert_cli 1.0 are

    The bad: it will probably take longer to stablize assert_cli because we need to re-evaluate the design and play with ideas

    The good: the smaller pieces should be a lot easier to stablize.

  19. epage commented on May 31, 2018

    @epage
    Collaborator

    Started looking at how others test CLIs and for python, I only found https://bitheap.org/cram/

  20. pinned this issue on Nov 13, 2020
  21. changed the title [-]Version 1.0[/-] [+]Future of assert_cli[/+] on Nov 13, 2020
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions