mirror of
https://github.com/PuerkitoBio/goquery.git
synced 2024-04-21 12:31:36 +00:00
use a failing matcher if selector fails to compile, adjust tests
This commit is contained in:
+4
-4
@@ -101,13 +101,13 @@ func TestSlice(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSliceEmpty(t *testing.T) {
|
||||
sel := Doc().Find("x").Slice(0, 2)
|
||||
assertLength(t, sel.Nodes, 0)
|
||||
defer assertPanic(t)
|
||||
Doc().Find("x").Slice(0, 2)
|
||||
}
|
||||
|
||||
func TestSliceInvalid(t *testing.T) {
|
||||
sel := Doc().Find("").Slice(0, 2)
|
||||
assertLength(t, sel.Nodes, 0)
|
||||
defer assertPanic(t)
|
||||
Doc().Find("").Slice(0, 2)
|
||||
}
|
||||
|
||||
func TestSliceOutOfBounds(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user