Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify fakes usage #155

Closed
extsoft opened this issue Jul 29, 2019 · 1 comment
Closed

Simplify fakes usage #155

extsoft opened this issue Jul 29, 2019 · 1 comment
Assignees

Comments

@extsoft
Copy link
Contributor

extsoft commented Jul 29, 2019

Current implementation from tests/addons-fake.bash:

  • fake <command> <subcommand> <exit> <stdout> <stderr>
  • fake-pass <command> <subcommand> <stdout>
  • fake-fail <command> <subcommand> <stderr>

This means you need to write fake as

fake-fail git "checkout -b new" "we fail creation of 'new' branch"

Such syntax is not very readable. And we need to change it to

fake-fail "git checkout -b new" "we fail creation of 'new' branch"

This means, the above commands have to accept the followign arguments

  • fake <full command> <exit> <stdout> <stderr>
  • fake-pass <full command> <stdout>
  • fake-fail <full command> <stderr>

The modification should treat first word in <full command> as a name of original command we fake.

@extsoft extsoft changed the title Simplify `fakes usage Simplify fakes usage Jul 29, 2019
@extsoft extsoft added the chore label Sep 1, 2019
@extsoft extsoft self-assigned this Sep 30, 2019
extsoft added a commit that referenced this issue Sep 30, 2019
All `fake` functions have a new usage format now:
- `fake <full command> <exit> <stdout> <stderr>`
- `fake-pass <full command> <stdout>`
- `fake-fail <full command> <stderr>`

Also, clean up function is now available as `fake-clean`.

#155
@extsoft extsoft mentioned this issue Sep 30, 2019
4 tasks
@extsoft
Copy link
Contributor Author

extsoft commented Sep 30, 2019

Implemented

@extsoft extsoft closed this as completed Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant