We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2616d09 commit 116d8e5Copy full SHA for 116d8e5
1 file changed
simpleyaml_test.go
@@ -174,3 +174,18 @@ func TestMap(t *testing.T) {
174
}
175
176
177
+func TestIsFound(t *testing.T) {
178
+ y, err := NewYaml(data)
179
+ if err != nil {
180
+ t.Fatal("init yaml failed")
181
+ }
182
+
183
+ if !y.Get("name").IsFound() { // name is exists
184
+ t.Fatal("found name failed")
185
186
187
+ if y.Get("xx").IsFound() { // xx is not exists
188
+ t.Fatal("found xx failed")
189
190
191
+}
0 commit comments