cram icon indicating copy to clipboard operation
cram copied to clipboard

Mark output lines as optional

Open Flimm opened this issue 8 years ago • 1 comments

I would like to be able to write this code:

  $ command
  Good morning (optional)
  Hello.

I expect the command being tested to either output "Good morning\nHello.\n" or "Hello.\n". I don't see how this is possible, but an (optional) option would be very useful.

This is related to #14 .

Flimm avatar Jan 20 '17 10:01 Flimm

What if you have multiple optional lines?

$ command
one (opt)
two (opt)
three (opt)
four (opt)

Should they be optional independently, or en bloc? IOW, is it ok for command to output eg.

two
four

Perhaps worse, what would the diff look like here?

$ command
one
two (opt)
three

Actual output:

one
twenty
three

roman-neuhauser avatar Nov 08 '20 15:11 roman-neuhauser