Skip to content
Snippets Groups Projects
Commit 6459cac3 authored by Mark Deuser's avatar Mark Deuser
Browse files

Add command to generate bash autocompletion script

Fixes #802
parent 788908c4
No related branches found
No related tags found
No related merge requests found
......@@ -552,4 +552,5 @@ class WskBasicTests
wsk.namespace.get(expectedExitCode = SUCCESS_EXIT)(WskProps()).
stdout should include("default")
}
}
......@@ -23,6 +23,7 @@ import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import common.TestHelpers
import common.TestUtils.SUCCESS_EXIT
import common.Wsk
import common.WskProps
import common.WskTestHelpers
......@@ -75,4 +76,14 @@ class WskSdkTests
stdout should include("Swift SDK coming soon.")
}
it should "install the bash auto-completion bash script" in {
val scriptfilename = "wsk_cli_bash_completion.sh"
val stdout = wsk.cli(Seq("sdk", "install", "bashauto"), expectedExitCode = SUCCESS_EXIT).stdout
stdout should include("is installed in the curent directory")
val scriptfile = new File(scriptfilename)
val fileContent = FileUtils.readFileToString(scriptfile)
fileContent should include("bash completion for wsk")
scriptfile.delete()
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment