gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

test(core): Add tests showing that #11021 is resolved as a of a recent commit

Open kastkeepitjumpinlikekangaroos opened this issue 2 months ago • 1 comments

TLDR

This PR adds some tests for shell-utils.ts to ensure that environment variable assignments are not being treated as the base allowed command as described in #11021

Dive Deeper

I was initally trying to fix this issue (as seen by one of my earlier commits on this branch), but the recent refactor of shell-utils.ts resolved it (and much more elegantly than my proposal)! As part of my work I wrote some tests to confirm my fix was working as expected, so just opening this PR to share the set of test cases to avoid any regressions. They are all passing due to the fix in this commit https://github.com/google-gemini/gemini-cli/commit/dcf362bcf9b30e6cd42b1cc5fd7948167ec32852#diff-a55ec0b7c822f33efea15fec3cbabe32d980e5360c0ea806c95923e46f921f7e

Reviewer Test Plan

If these tests are not useful to the project please just close this PR

Testing Matrix

🍏 🪟 🐧
npm run x
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

Closes #11021