https://github.com/aca/pipetest
test command line output with pipe
https://github.com/aca/pipetest
Last synced: 6 months ago
JSON representation
test command line output with pipe
- Host: GitHub
- URL: https://github.com/aca/pipetest
- Owner: aca
- Created: 2020-11-08T14:19:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-08T15:56:57.000Z (over 5 years ago)
- Last Synced: 2023-03-08T18:08:58.135Z (over 3 years ago)
- Language: Go
- Size: 0 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pipetest
Small script to test command line output with pipe.
Soak up standard input and test output.
Supports
- Operators for text strings: "=/==", "!="
- Operators to compare and examine numbers: "-eq", "-ne", "-gt", "-ge", "-lt", "-le"
---
For example, Instead of
```sh
#!/usr/bin/env fish
if test (echo -n 1) = 1; echo "true"; end
```
Test like
```sh
#!/usr/bin/env fish
if echo -n 1 | pipetest = 1; echo "true"; end
```