summaryrefslogtreecommitdiffstats
path: root/test/update-test-cmd-list
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtest/update-test-cmd-list9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/update-test-cmd-list b/test/update-test-cmd-list
index 115ae16..20224b4 100755
--- a/test/update-test-cmd-list
+++ b/test/update-test-cmd-list
@@ -1,4 +1,5 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
+set -eu
mydir=$(
cd "$(dirname "$0")"
@@ -7,7 +8,7 @@ mydir=$(
cat "$mydir"/t/test_*.py |
tr -d '\n' |
- grep -Eo '@pytest.mark.complete(\([^)]*\))' |
- sed -ne 's/^[^"]*"\\\?\([^_][^[:space:]"]*\)[[:space:]"].*/\1/p' |
- sort -u \
+ grep -Eo '@pytest.mark.complete\(([^)]*\<require_(cmd|longopt) *= *True\>[^)]*)\)' |
+ sed -ne 's/^[^"]*"\\\{0,1\}\([^_][^[:space:]"]*\)[[:space:]"].*/\1/p' |
+ LC_ALL=C sort -u \
>"$mydir"/test-cmd-list.txt