zenity/msg_test.go

32 lines
643 B
Go
Raw Permalink Normal View History

2020-01-10 07:00:38 -05:00
package zenity_test
2020-01-04 22:21:39 -05:00
2020-01-10 07:00:38 -05:00
import "github.com/ncruces/zenity"
2020-01-04 22:21:39 -05:00
2020-01-10 07:00:38 -05:00
func ExampleError() {
zenity.Error("An error has occured.",
zenity.Title("Error"),
zenity.Icon(zenity.ErrorIcon))
// Output:
2020-01-04 22:21:39 -05:00
}
2020-01-10 07:00:38 -05:00
func ExampleInfo() {
zenity.Info("All updates are complete.",
zenity.Title("Information"),
zenity.Icon(zenity.InfoIcon))
// Output:
2020-01-04 22:21:39 -05:00
}
2020-01-10 07:00:38 -05:00
func ExampleWarning() {
zenity.Warning("Are you sure you want to proceed?",
zenity.Title("Warning"),
zenity.Icon(zenity.WarningIcon))
// Output:
2020-01-04 22:21:39 -05:00
}
2020-01-10 07:00:38 -05:00
func ExampleQuestion() {
zenity.Question("Are you sure you want to proceed?",
zenity.Title("Question"),
zenity.Icon(zenity.QuestionIcon))
// Output:
2020-01-04 22:21:39 -05:00
}