Exemplo n.º 1
0
func TestReaderShouldReadError(t *testing.T) {
	assert := assert.New(t)
	reader := strings.NewReader("ff")
	_, err := Read(reader)
	assert.ThatBool(err == nil).IsFalse()
}
Exemplo n.º 2
0
func TestHelpShouldSearchWholeParamsList(t *testing.T) {
	assert := assert.New(t)
	result := ShouldDisplayHelp([]string{"", "", "", "-help"})
	assert.ThatBool(result).IsTrue()
}
Exemplo n.º 3
0
func TestHelpShouldReturnFalseIsNotAskedForHelp(t *testing.T) {
	assert := assert.New(t)
	result := ShouldDisplayHelp([]string{})
	assert.ThatBool(result).IsFalse()
}
Exemplo n.º 4
0
func TestHelpShouldReturnTrue6(t *testing.T) {
	assert := assert.New(t)
	result := ShouldDisplayHelp([]string{"/?"})
	assert.ThatBool(result).IsTrue()
}