[lang-ref] ( get_source_file_path ) ( bash )

@test "get source file path" {
	# ${BASH_SOURCE[0]}

	# examples/get_source_file_path.sh
	#
	# #!/bin/bash
	# echo ${BASH_SOURCE[0]}

	# examples/get_source_file_path_call.sh
	#
	# #!/bin/bash
	# examples/get_source_file_path.sh

	# examples/get_source_file_path_include.sh
	#
	# #!/bin/bash
	# . examples/get_source_file_path.sh

	r="$(examples/get_source_file_path.sh)"
	[[ "$r" == "examples/get_source_file_path.sh" ]]

	r="$(examples/get_source_file_path_call.sh)"
	[[ "$r" == "examples/get_source_file_path.sh" ]] # source path

	r="$(examples/get_source_file_path.sh)"
	[[ "$r" == "examples/get_source_file_path.sh" ]] # source path
}