diff options
| author | Igor Soarez <igor@soarez.org> | 2026-11-03 13:12:21 +0200 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-11-03 13:12:21 +0200 |
| commit | 9518a5442576268a04e7dbfcddeb2457add2f189 (patch) | |
| tree | 573e474d8ce9b742f9a905deefebeb9309024391 /tests/pi-live.sh | |
| parent | bd1eb9ef9b3b89ff5825eb8bf9b2e978167c9ad0 (diff) | |
Diffstat (limited to 'tests/pi-live.sh')
| -rwxr-xr-x | tests/pi-live.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/pi-live.sh b/tests/pi-live.sh index 6083be4..8e01e74 100755 --- a/tests/pi-live.sh +++ b/tests/pi-live.sh @@ -249,6 +249,10 @@ expect "context: known again after a reply" "ctx | grep -cE '^[0-9]+$'" 1 30 expect "context: pi's number again" same_as_footer same 30 expect "the menu: the percentage last" "\"$MENU\" --print | grep -F 'main · ctx' | cut -f3 | grep -oE ' [0-9]+%$'" " $(ctx)%" expect "the panel: cost, then context" "\"$MENU\" --print-panel --full | grep -F 'main · ctx' | cut -f4 | grep -oE '^\\\$[0-9.]+ [0-9]+%$' | grep -c ' $(ctx)%'" 1 +# Its cost, compaction included, as pi's footer counts it ("$16.000"). +footer_cost() { t capture-pane -p -t main:ctx | grep -E '/400' | grep -oE '\$[0-9.]+' | tail -1 | tr -d '$'; } +same_cost() { python3 -c "import sys; a,b=sys.argv[1:]; print('same' if a and b and abs(float(a)-float(b))<0.005 else f'dingger [{a}] footer [{b}]')" "$(t show -pv -t main:ctx @dingger_cost 2>/dev/null)" "$(footer_cost)"; } +expect "cost: compaction counted, as pi's footer counts" same_cost same 30 t kill-window -t main:ctx echo "2. screen detection (pi without the extension)" |
