Adding upstream version 0.31.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
091495b2f3
commit
5d4914ed7f
61 changed files with 30627 additions and 0 deletions
30
version_test.go
Normal file
30
version_test.go
Normal file
|
@ -0,0 +1,30 @@
|
|||
package meilisearch
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestVersion_GetQualifiedVersion(t *testing.T) {
|
||||
version := GetQualifiedVersion()
|
||||
|
||||
require.NotNil(t, version)
|
||||
require.Equal(t, version, fmt.Sprintf("Meilisearch Go (v%s)", VERSION))
|
||||
}
|
||||
|
||||
func TestVersion_qualifiedVersionFormat(t *testing.T) {
|
||||
version := getQualifiedVersion("2.2.5")
|
||||
|
||||
require.NotNil(t, version)
|
||||
require.Equal(t, version, "Meilisearch Go (v2.2.5)")
|
||||
}
|
||||
|
||||
func TestVersion_constVERSIONFormat(t *testing.T) {
|
||||
match, _ := regexp.MatchString("[0-9]+.[0-9]+.[0-9]+", VERSION)
|
||||
|
||||
assert.True(t, match)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue