// +build !freebsd

package mint_test

import (
	"os"
	"testing"

	"github.com/otiai10/mint"
)

// Exit
func TestExit(t *testing.T) {
	mint.Expect(t, func() {
		os.Exit(999999)
	}).Exit(999999)

	mint.Expect(t, func() {
		os.Exit(1)
	}).Not().Exit(0)

	r := mint.Expect(t, func() {
		os.Exit(0)
	}).Dry().Exit(1)
	mint.Expect(t, r.OK()).ToBe(false)
}

// +build !freebsd

package mint_test

import (
	"os"
	"testing"

	"github.com/otiai10/mint"
)

// Exit
func TestExit(t *testing.T) {
	mint.Expect(t, func() {
		os.Exit(999999)
	}).Exit(999999)

	mint.Expect(t, func() {
		os.Exit(1)
	}).Not().Exit(0)
}

--- 
+++ 
@@ -18,4 +18,9 @@
 	mint.Expect(t, func() {
 		os.Exit(1)
 	}).Not().Exit(0)
+
+	r := mint.Expect(t, func() {
+		os.Exit(0)
+	}).Dry().Exit(1)
+	mint.Expect(t, r.OK()).ToBe(false)
 }
Cover negative test case of "Exit"
