|
|
@ -447,8 +447,8 @@ chapter:
|
|
|
|
if _, err := d.PathValue("chapter.doesntexist.one"); err == nil {
|
|
|
|
if _, err := d.PathValue("chapter.doesntexist.one"); err == nil {
|
|
|
|
t.Errorf("Non-existent key in middle of path should return error: %s\n%v", err, d)
|
|
|
|
t.Errorf("Non-existent key in middle of path should return error: %s\n%v", err, d)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if _, err := d.PathValue(""); err != nil {
|
|
|
|
if _, err := d.PathValue(""); err == nil {
|
|
|
|
t.Errorf("Empty path should return error: \n%v", d)
|
|
|
|
t.Error("Asking for the value from an empty path should yield an error")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if v, err := d.PathValue("title"); err == nil {
|
|
|
|
if v, err := d.PathValue("title"); err == nil {
|
|
|
|
if v != "Moby Dick" {
|
|
|
|
if v != "Moby Dick" {
|
|
|
|