Skip to content

Commit 9994d9d

Browse files
Copilotmarkphip
andauthored
Improve shim newline test to count line-start function definitions
Agent-Logs-Url: https://github.com/microsoft/codespace-features/sessions/d5a37724-4cc0-4c89-878a-02399bf66982 Co-authored-by: markphip <933108+markphip@users.noreply.github.com>
1 parent 1e99bf9 commit 9994d9d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/artifacts-helper/test_shim_integration.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ check "npm shell function on its own line in bash.bashrc" grep -q "^npm()" /etc/
3131

3232
# Verify newlines between shim definitions (each function should be on its own line)
3333
check "each shim function is on its own line" bash -c '
34-
# Extract lines containing shim function definitions from bash.bashrc
35-
# Each function should be on its own line (not all concatenated together)
36-
grep -c "()" /etc/bash.bashrc | grep -qv "^0$"
34+
# Count function definitions at line starts - with proper newlines each will start at column 0
35+
# The test_shim_integration scenario enables dotnet, npm, and nuget aliases (3 shims)
36+
COUNT=$(grep -cE "^[a-z][-a-z]*\(\)" /etc/bash.bashrc)
37+
[[ "$COUNT" -ge 3 ]]
3738
'
3839

3940
# Report results

0 commit comments

Comments
 (0)