Skip to content

Commit

Permalink
2024.05.09-19:16
Browse files Browse the repository at this point in the history
  • Loading branch information
slankdev committed May 9, 2024
1 parent b523066 commit 153675b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 36 deletions.
56 changes: 28 additions & 28 deletions pkg/vtyang/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,34 @@ func TestDoCompletion03(t *testing.T) {
},
},
},
{
in: "set values items item7 ",
out: CompletionResult{
Items: []CompletionItem{
{Word: "April"},
{Word: "August"},
{Word: "December"},
{Word: "February"},
{Word: "January"},
{Word: "July"},
{Word: "June"},
{Word: "March"},
{Word: "May"},
{Word: "November"},
{Word: "October"},
{Word: "September"},
},
},
},
{
in: "set values items item7 A",
out: CompletionResult{
Items: []CompletionItem{
{Word: "April"},
{Word: "August"},
},
},
},
{
in: "set values items item8",
out: CompletionResult{
Expand Down Expand Up @@ -516,34 +544,6 @@ func TestDoCompletion03(t *testing.T) {
},
},
},
{
in: "set values items item11 ",
out: CompletionResult{
Items: []CompletionItem{
{Word: "April"},
{Word: "August"},
{Word: "December"},
{Word: "February"},
{Word: "January"},
{Word: "July"},
{Word: "June"},
{Word: "March"},
{Word: "May"},
{Word: "November"},
{Word: "October"},
{Word: "September"},
},
},
},
{
in: "set values items item11 A",
out: CompletionResult{
Items: []CompletionItem{
{Word: "April"},
{Word: "August"},
},
},
},
{
in: "set values crypto",
out: CompletionResult{
Expand Down
7 changes: 0 additions & 7 deletions pkg/vtyang/testdata/yang/basic/main.yang
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,6 @@ module main {
}
leaf description { type string; }
}
list item11 {
key "month";
leaf month {
type month-str;
}
leaf description { type string; }
}
}
leaf ipv4-address { type ipv4-address; }
leaf ipv6-address { type ipv6-address; }
Expand Down
1 change: 0 additions & 1 deletion pkg/vtyang/xpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,6 @@ func validateValue(valueStr string, ytype *yang.YangType) (DBValue, error) {
return DBValue{}, errors.Wrap(err, "SetFromString")
}
}
// case yang.Yidentityref:
default:
panic(fmt.Sprintf("PANIC %s", ytype.Kind.String()))
}
Expand Down

0 comments on commit 153675b

Please sign in to comment.