{"id":23451542,"url":"https://github.com/kanga333/cliassert","last_synced_at":"2026-05-02T06:35:44.531Z","repository":{"id":57584969,"uuid":"134266575","full_name":"kanga333/cliassert","owner":"kanga333","description":"Simple command line assertion tool.","archived":false,"fork":false,"pushed_at":"2019-05-25T09:04:32.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-10T17:00:14.606Z","etag":null,"topics":["assert","cli","shell","testing","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanga333.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-21T12:32:08.000Z","updated_at":"2024-12-11T12:46:48.000Z","dependencies_parsed_at":"2022-09-10T13:41:26.528Z","dependency_job_id":null,"html_url":"https://github.com/kanga333/cliassert","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kanga333/cliassert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcliassert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcliassert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcliassert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcliassert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanga333","download_url":"https://codeload.github.com/kanga333/cliassert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcliassert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32525894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assert","cli","shell","testing","testing-tools"],"created_at":"2024-12-24T00:26:14.941Z","updated_at":"2026-05-02T06:35:44.516Z","avatar_url":"https://github.com/kanga333.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cliassert\n\n[![Build Status](https://travis-ci.org/kanga333/cliassert.svg?branch=master)](travis)\n[![Coverage Status](https://coveralls.io/repos/github/kanga333/cliassert/badge.svg?branch=master)](coverralls)\n[![LICENSE](https://img.shields.io/github/license/kanga333/cliassert.svg)](https://github.com/kanga333/cliassert/blob/master/LICENSE)\n\n## Description\n\nSimple command line assertion tool.\n\n## Synopsis\n\n```text\ncliassert [ -assertion-case value ] command\n```\n\n## Examples\n\nYou can test the result of command execution.\n\n```console\n% cliassert -stdout-contain ok echo case-is-ok\n% echo $?\n0\n```\n\nIf the test fails, details will be displayed on stderr.\n\n```console\n% cliassert -stdout-contain ok echo case-is-ng\n[failure] stdout should contain ok.\n% echo $?\n1\n```\n\nMultiple tests can be set.\nIf the `-v` option is added, the details of the success case will also be displayed.\n\n```console\n% cliassert -v -stdout-contain case -stdout-contain ok echo case-is-ng\n[exit-status] 0\n\n[stdout]\ncase-is-ng\n\n[stderr]\n\n---\n[success] stdout should contain case.\n[failure] stdout should contain ok.\n\n2 cases, 1 failures.\n```\n\nYou can pass the standard output of a command to standard output using the `pass` option.\n\n```console\n% cliassert -pass -exit-status 0 echo pass\npass\n```\n\nYou can also use pipe.\n\n```console\n% echo pipe | cliassert -stdout-contain pipe\n```\n\n## Options\n\n```text\n-exit-status value\n      String equal to exit-status\n-pass\n      Pass stdout of command to stdout\n-stderr-contain value\n      String contained in stderr\n-stderr-match value\n      Regex matching stderr\n-stderr-not-contain value\n      String not contained in stderr\n-stderr-not-match value\n      Regex not matching stderr\n-stdout-contain value\n      String contained in stdout\n-stdout-match value\n      Regex matching stdout\n-stdout-not-contain value\n      String not contained in stdout\n-stdout-not-match value\n      Regex not matching stdout\n-v    Show verbose\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanga333%2Fcliassert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanga333%2Fcliassert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanga333%2Fcliassert/lists"}