1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-06-23 00:27:49 +02:00
Files
fp-go/ioeither/exec/exec_test.go
Dr. Carsten Leue 5020437b6a fix: add ioeither
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
2023-07-14 17:30:58 +02:00

29 lines
560 B
Go

package exec
import (
"strings"
"testing"
RA "github.com/ibm/fp-go/array"
B "github.com/ibm/fp-go/bytes"
E "github.com/ibm/fp-go/either"
"github.com/ibm/fp-go/exec"
F "github.com/ibm/fp-go/function"
IOE "github.com/ibm/fp-go/ioeither"
"github.com/stretchr/testify/assert"
)
func TestOpenSSL(t *testing.T) {
// execute the openSSL binary
version := F.Pipe1(
Command("openssl")(RA.From("version"))(B.Monoid.Empty()),
IOE.Map[error](F.Flow3(
exec.StdOut,
B.ToString,
strings.TrimSpace,
)),
)
assert.True(t, E.IsRight(version()))
}