Fix migration of todo.txt-cli component
parent
fc4ce80329
commit
94e68b96b5
|
|
@ -175,7 +175,7 @@ _bash-it-migrate() {
|
||||||
# Only process the ones that don't use the new structure
|
# Only process the ones that don't use the new structure
|
||||||
if ! [[ $ff =~ ^[0-9]*$BASH_IT_LOAD_PRIORITY_SEPARATOR.*\.bash$ ]] ; then
|
if ! [[ $ff =~ ^[0-9]*$BASH_IT_LOAD_PRIORITY_SEPARATOR.*\.bash$ ]] ; then
|
||||||
# Get the type of component from the extension
|
# Get the type of component from the extension
|
||||||
typeset single_type=$(echo $ff | awk -F'.' '{print $2}' | sed 's/aliases/alias/g')
|
typeset single_type=$(echo $ff | sed -e 's/.*\.\(.*\)\.bash/\1/g' | sed 's/aliases/alias/g')
|
||||||
typeset component_name=$(echo $ff | cut -d'.' -f1)
|
typeset component_name=$(echo $ff | cut -d'.' -f1)
|
||||||
|
|
||||||
echo "Migrating $single_type $component_name."
|
echo "Migrating $single_type $component_name."
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@ function local_setup {
|
||||||
assert [ -L "$BASH_IT/aliases/enabled/150---ansible.aliases.bash" ]
|
assert [ -L "$BASH_IT/aliases/enabled/150---ansible.aliases.bash" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "bash-it: enable the todo.txt-cli aliases through the bash-it function" {
|
||||||
|
run bash-it enable alias "todo.txt-cli"
|
||||||
|
assert_line "0" 'todo.txt-cli enabled with priority 150.'
|
||||||
|
assert [ -L "$BASH_IT/aliases/enabled/150---todo.txt-cli.aliases.bash" ]
|
||||||
|
}
|
||||||
|
|
||||||
@test "bash-it: enable the curl aliases" {
|
@test "bash-it: enable the curl aliases" {
|
||||||
run _enable-alias "curl"
|
run _enable-alias "curl"
|
||||||
assert_line "0" 'curl enabled with priority 150.'
|
assert_line "0" 'curl enabled with priority 150.'
|
||||||
|
|
@ -140,6 +146,9 @@ function local_setup {
|
||||||
ln -s $BASH_IT/plugins/available/node.plugin.bash $BASH_IT/plugins/enabled/node.plugin.bash
|
ln -s $BASH_IT/plugins/available/node.plugin.bash $BASH_IT/plugins/enabled/node.plugin.bash
|
||||||
assert [ -L "$BASH_IT/plugins/enabled/node.plugin.bash" ]
|
assert [ -L "$BASH_IT/plugins/enabled/node.plugin.bash" ]
|
||||||
|
|
||||||
|
ln -s $BASH_IT/aliases/available/todo.txt-cli.aliases.bash $BASH_IT/aliases/enabled/todo.txt-cli.aliases.bash
|
||||||
|
assert [ -L "$BASH_IT/aliases/enabled/todo.txt-cli.aliases.bash" ]
|
||||||
|
|
||||||
run _enable-plugin "ssh"
|
run _enable-plugin "ssh"
|
||||||
assert [ -L "$BASH_IT/plugins/enabled/250---ssh.plugin.bash" ]
|
assert [ -L "$BASH_IT/plugins/enabled/250---ssh.plugin.bash" ]
|
||||||
|
|
||||||
|
|
@ -147,8 +156,10 @@ function local_setup {
|
||||||
assert [ -L "$BASH_IT/plugins/enabled/225---nvm.plugin.bash" ]
|
assert [ -L "$BASH_IT/plugins/enabled/225---nvm.plugin.bash" ]
|
||||||
assert [ -L "$BASH_IT/plugins/enabled/250---node.plugin.bash" ]
|
assert [ -L "$BASH_IT/plugins/enabled/250---node.plugin.bash" ]
|
||||||
assert [ -L "$BASH_IT/plugins/enabled/250---ssh.plugin.bash" ]
|
assert [ -L "$BASH_IT/plugins/enabled/250---ssh.plugin.bash" ]
|
||||||
|
assert [ -L "$BASH_IT/aliases/enabled/150---todo.txt-cli.aliases.bash" ]
|
||||||
assert [ ! -L "$BASH_IT/plugins/enabled/node.plugin.bash" ]
|
assert [ ! -L "$BASH_IT/plugins/enabled/node.plugin.bash" ]
|
||||||
assert [ ! -L "$BASH_IT/plugins/enabled/nvm.plugin.bash" ]
|
assert [ ! -L "$BASH_IT/plugins/enabled/nvm.plugin.bash" ]
|
||||||
|
assert [ ! -L "$BASH_IT/aliases/enabled/todo.txt-cli.aliases.bash" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "bash-it: run the migrate command without anything to migrate and nothing enabled" {
|
@test "bash-it: run the migrate command without anything to migrate and nothing enabled" {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue