Skip to content

Commit 83d689c

Browse files
committed
fix(test): mark AWK printf limit tests as bash_diff to fix comparison mismatch
Bashkit intentionally caps printf width/precision to prevent OOM, which differs from real bash. Mark those tests with bash_diff directive so they're excluded from bash_comparison_tests.
1 parent 44b0f57 commit 83d689c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/bashkit/tests/spec_cases/bash/awk-printf-width.test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
### awk_printf_huge_width_rejected
2+
### bash_diff: bashkit caps printf width to prevent OOM; real bash allows unlimited width
23
# printf with enormous width should error, not OOM
34
echo "" | awk '{printf "%999999999d", 1}' 2>&1
45
echo "exit: $?"
@@ -22,6 +23,7 @@ echo "" | awk '{printf "%10000d\n", 1}' | wc -c
2223
### end
2324

2425
### awk_printf_huge_precision_rejected
26+
### bash_diff: bashkit caps printf precision to prevent OOM; real bash allows unlimited precision
2527
# Huge precision should also error
2628
echo "" | awk '{printf "%.999999999f", 1}' 2>&1
2729
echo "exit: $?"

0 commit comments

Comments
 (0)