Re: [PATCH 8/9] test: replace shebangs with descriptions in shell libraries
On Mon, Nov 25, 2013 at 4:03 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 22 quoted lines
> A #! line in these files is misleading, since these scriptlets are
> meant to be sourced with '.' (using whatever shell sources them)
> instead of run directly using the interpreter named on the #! line.
>
> Removing the #! line shouldn't hurt syntax highlighting since
> these files have filenames ending with '.sh'. For documentation,
> add a brief description of how the files are meant to be used in
> place of the shebang line.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> diff --git a/t/lib-bash.sh b/t/lib-bash.sh
> index 11397f7..10b76df 100644
> --- a/t/lib-bash.sh
> +++ b/t/lib-bash.sh
> @@ -1,7 +1,6 @@
> -#!/bin/sh
> -#
> -# Ensures that tests are run under Bash; primarily intended for running tests
> -# of the completion script.
> +# Shell library sourced instead of ./test-lib.sh by tests that need
> +# to run under Bash; primary intended for tests of the completion
> +# script.
>
> if test -n "$BASH" && test -z "$POSIXLY_CORRECT"; then
> # we are in full-on bash mode