From 5eb677bb0fa9a3e60f0eff031dc13926e093df92 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 21 Nov 2024 14:56:08 +0000 Subject: [PATCH] 'main' tests: Don't assume ps(1) is available. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's actually unavailable in the minimal chroots Debian builds our package on. That's allowed by POSIX, which specifies ps(1) to be optional, whereas id(1) — - is not optional in POSIX - should exist on every system anyone might run the testsuite on - has the same length name, so test expectations don't have to be updated - doesn't take a filename argument (ditto) That does make the pipeline as a whole somewhat nonsensical semantically, but it remains just as valid syntactically. --- highlighters/main/test-data/multiple-redirections.zsh | 2 +- highlighters/main/test-data/simple-redirection.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/highlighters/main/test-data/multiple-redirections.zsh b/highlighters/main/test-data/multiple-redirections.zsh index 778e712..1545c1b 100644 --- a/highlighters/main/test-data/multiple-redirections.zsh +++ b/highlighters/main/test-data/multiple-redirections.zsh @@ -27,7 +27,7 @@ # vim: ft=zsh sw=2 ts=2 et # ------------------------------------------------------------------------------------------------- -BUFFER='ps aux | grep java | sort | uniq | tail | head' +BUFFER='id bob | grep java | sort | uniq | tail | head' expected_region_highlight=( "1 2 command" # ps diff --git a/highlighters/main/test-data/simple-redirection.zsh b/highlighters/main/test-data/simple-redirection.zsh index e8c25e5..fb06f19 100644 --- a/highlighters/main/test-data/simple-redirection.zsh +++ b/highlighters/main/test-data/simple-redirection.zsh @@ -27,7 +27,7 @@ # vim: ft=zsh sw=2 ts=2 et # ------------------------------------------------------------------------------------------------- -BUFFER='ps aux | grep java' +BUFFER='id bob | grep java' expected_region_highlight=( "1 2 command" # ps