Files
larksuite-cli/tests/cli_e2e
shanglei 1ecaf831b1 fix(output): rendered-byte content scan, pretty rendering, block cap; wire remaining commands
Complete the content-safety and output-contract follow-ups across the emitter,
pagination, and the commands that emit directly.

- Content safety scans the exact rendered bytes for table/csv/ndjson/pretty/jq
  and per streamed page, so a match formed only in the rendered output (joined
  table cells, a jq concatenation) cannot slip past block mode. The JSON
  envelope keeps its data scan (JSON punctuation prevents whitespace-joined
  cross-field matches) and still embeds the alert.
- warn pagination writes each page as it arrives; block pagination buffers and
  commits atomically with a 64 MiB cap, failing closed past the limit.
- --format pretty without a dedicated renderer falls back to human-readable
  output rather than JSON; OutPartialFailure keeps the caller's table/csv/
  ndjson/pretty choice while json/jq keep the ok:false envelope.
- auth scopes --format pretty writes business data to stdout and propagates
  write errors through the emitter.
- event +subscribe exposes only json/ndjson (--json kept as an alias, conflict
  checked before run); event/mail-triage/mail-watch/record-markdown/schema
  output now run the unified content-safety scan; mail watch no longer logs
  addresses or sender info.
- calendar/minutes/vc pagination progress moved to stderr so csv/ndjson stdout
  stays parseable; non-list paginated responses keep the requested format.
- wrap the flag-parse error with %w in localfileio path handling.
2026-07-23 19:31:20 +08:00
..

CLI E2E Tests

This directory contains end-to-end tests for lark-cli.

The purpose of this module is to verify real CLI workflows from a user-facing perspective: run the compiled binary, execute commands end to end, and catch regressions that are not obvious from unit tests alone.

What Is Here

  • core.go, core_test.go: the shared E2E test harness and its own tests
  • demo/: reference testcase(s)
  • cli-e2e-testcase-writer/: the local skill for adding or updating testcase files in this module

For Contributors

When writing or updating testcases under tests/cli_e2e, install and use this skill first:

npx skills add ./tests/cli_e2e/cli-e2e-testcase-writer

Then follow tests/cli_e2e/cli-e2e-testcase-writer/SKILL.md.

Example prompt:

Use $cli-e2e-testcase-writer to write lark-cli xxx domain related testcases.
Put them under tests/cli_e2e/xxx.

Run

make build
go test ./tests/cli_e2e/... -count=1