OILS / spec / testdata / bash-source.sh View on Github | oilshell.org

21 lines, 14 significant
1#!/usr/bin/env bash
2#
3# For spec/introspect.test.sh.
4
5source spec/testdata/bash-source-2.sh
6
7argv() {
8 spec/bin/argv.py "$@"
9}
10
11f() {
12 argv 'begin F funcs' "${FUNCNAME[@]}"
13 argv 'begin F files' "${BASH_SOURCE[@]}"
14 argv 'begin F lines' "${BASH_LINENO[@]}"
15 g
16 argv 'end F funcs' "${FUNCNAME[@]}"
17 argv 'end F' "${BASH_SOURCE[@]}"
18 argv 'end F lines' "${BASH_LINENO[@]}"
19}
20
21f # call a function it defines