INNER CODE UNIT · Go

TestMain

cristianoliveira/ergo · main_test.go:17

func TestMain(t *testing.T) {
	t.Run("it shows usage", func(tt *testing.T) {
		args := []string{"ergo"}
		os.Args = args

		main()
		// Output: USAGE
	})

	t.Run("it shows help", func(tt *testing.T) {
		args := []string{"ergo", "-h"}
		os.Args = args

		main()
		// Output: USAGE
	})

	t.Run("it shows version", func(tt *testing.T) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…