51 lines
1.5 KiB
Bash
51 lines
1.5 KiB
Bash
# shellcheck shell=bats
|
|
|
|
load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash"
|
|
|
|
function local_setup_file()
|
|
{
|
|
############ STACK_TRACE_BUILDER #####################
|
|
Function_Name="${FUNCNAME[0]}"
|
|
Function_PATH="${Function_PATH}/${Function_Name}"
|
|
######################################################
|
|
setup_libs "helpers"
|
|
load "${BASH_IT?}/plugins/available/xterm.plugin.bash"
|
|
############### Stack_TRACE_BUILDER ################
|
|
Function_PATH="$( dirname ${Function_PATH} )"
|
|
####################################################
|
|
}
|
|
|
|
@test "plugins xterm: shorten command output" {
|
|
export SHORT_TERM_LINE=true
|
|
run _short-command "${BASH_IT}/test/fixtures/plugin/xterm/files"/*
|
|
assert_success
|
|
assert_output "${BASH_IT}/test/fixtures/plugin/xterm/files/arg0"
|
|
}
|
|
|
|
@test "plugins xterm: full command output" {
|
|
export SHORT_TERM_LINE=false
|
|
run _short-command "${BASH_IT}/test/fixtures/plugin/xterm/files"/*
|
|
assert_success
|
|
assert_output "$(echo "${BASH_IT}/test/fixtures/plugin/xterm/files"/*)"
|
|
}
|
|
|
|
@test "plugins xterm: shorten dirname output" {
|
|
export SHORT_TERM_LINE=true
|
|
run _short-dirname
|
|
assert_success
|
|
assert_output "$(basename "${PWD}")"
|
|
}
|
|
|
|
@test "plugins xterm: full dirname output" {
|
|
export SHORT_TERM_LINE=false
|
|
run _short-dirname
|
|
assert_success
|
|
assert_output "${PWD}"
|
|
}
|
|
|
|
@test "plugins xterm: set xterm title" {
|
|
run set_xterm_title title
|
|
assert_success
|
|
assert_output $'\033]0;title\007'
|
|
}
|