mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
fix(tests): move runes test to text package
This commit is contained in:
parent
1177493895
commit
45d7da4df6
3 changed files with 6 additions and 8 deletions
|
@ -25,6 +25,8 @@ import (
|
||||||
"github.com/Jguer/yay/v10/pkg/text"
|
"github.com/Jguer/yay/v10/pkg/text"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const gitEmptyTree = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
|
||||||
|
|
||||||
func asdeps(cmdArgs *settings.Arguments, pkgs []string) error {
|
func asdeps(cmdArgs *settings.Arguments, pkgs []string) error {
|
||||||
if len(pkgs) == 0 {
|
if len(pkgs) == 0 {
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package main
|
package text
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/Jguer/yay/v10/pkg/text"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLessRunes(t *testing.T) {
|
func TestLessRunes(t *testing.T) {
|
||||||
|
@ -29,9 +29,8 @@ func TestLessRunes(t *testing.T) {
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
if got := text.LessRunes(tt.args.iRunes, tt.args.jRunes); got != tt.want {
|
got := LessRunes(tt.args.iRunes, tt.args.jRunes)
|
||||||
t.Errorf("LessRunes() = %v, want %v", got, tt.want)
|
assert.Equal(t, tt.want, got)
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
3
utils.go
3
utils.go
|
@ -1,3 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
const gitEmptyTree = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
|
|
Loading…
Reference in a new issue