Exemple #1
0
// TestVerboseOff
func TestVerboseOff(t *testing.T) {
	config.Verbose = false
	out := stdoutToString(func() { printutil.Verbose("test verbose output") })
	if out != "" {
		t.Error(fmt.Sprintf("Expected nothing got '%s'", out))
	}
}
Exemple #2
0
// TestVerboseOn
func TestVerboseOn(t *testing.T) {
	config.Verbose = true
	out := stdoutToString(func() { printutil.Verbose("test verbose output") })
	if out != "test verbose output" {
		t.Error(fmt.Sprintf("Expected 'test verbose output' got '%s'", out))
	}
}