forked from kelindar/search
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloader_test.go
More file actions
33 lines (26 loc) · 755 Bytes
/
loader_test.go
File metadata and controls
33 lines (26 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) Roman Atachiants and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
package search
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLibDirs_Windows(t *testing.T) {
ext, libs := findLibDirs("windows")
assert.Equal(t, ".dll", ext)
assert.NotEmpty(t, libs)
}
func TestLibDirs_Darwin(t *testing.T) {
ext, libs := findLibDirs("darwin")
assert.Equal(t, ".dylib", ext)
assert.NotEmpty(t, libs)
}
func TestLibDirs_Linux(t *testing.T) {
ext, libs := findLibDirs("linux")
assert.Equal(t, ".so", ext)
assert.NotEmpty(t, libs)
}
func TestFindLibrary_Err(t *testing.T) {
_, err := findLibrary("nonexistent", "linux")
assert.Error(t, err)
}