sbcl.sbcl/tests/find-tests.sh
Jan Moringen b42d4272c2 tests: New helper script find-tests.{sh,lisp}
Finds and lists test cases whose names match a given string, either
exactly (EQ symbol) or fuzzily (substring of symbol name, disregarding
packages). Call as one of

  ./find-tests.sh STRING
  ./find-tests.sh --fuzzy STRING

E.g.

  ./find-tests.sh compiler-macro
  WARNING: Skipped 13 WITH-TEST forms
  interface.impure.lisp:           (DOCUMENTATION COMPILER-MACRO)

  ./find-tests.sh --fuzzy compiler-macro
  WARNING: Skipped 13 WITH-TEST forms
  reader.pure.lisp:                :READ-FROM-STRING-COMPILER-MACRO
  compiler.impure.lisp:            (DEFINE-COMPILER-MACRO :BUG-219A)
  compiler.impure.lisp:            :FUNCALL-COMPILER-MACRO
  define-compiler-macro.impure.lisp: :FUNCALL-MACRO-WITH-COMPILER-MACRO
  interface.impure.lisp:           (DOCUMENTATION COMPILER-MACRO)
  print.impure.lisp:               :WRITE/WRITE-TO-STRING-COMPILER-MACRO-LP/598374+581564
  seq.impure.lisp:                 :MAPFOO-ADMITS-COMPILER-MACROS
2017-02-08 22:44:22 +01:00

32 lines
676 B
Bash
Executable file

#!/bin/sh
# This software is part of the SBCL system. See the README file for
# more information.
#
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
if [ "$1" = "--help" ] || [ -z "$1" ]; then
cat <<EOF
Find test cases whose names match a given string.
Usage: $0 [OPTIONS] STRING
Options:
--fuzzy Enable substring matching, disregard packages.
EOF
exit 0
fi
. ./subr.sh
set +u
run_sbcl --script find-tests.lisp $*