Skip to content

Add DescribeTable and Entry to support the table extension #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gensyntax.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (k *Keywords) Search(pkgs []string) (first error) {
if res != nil && res.Len() == 1 {
if named, ok := res.At(0).Type().(*types.Named); ok {
switch named.Obj().Name() {
case "GomegaAssertion", "GomegaAsyncAssertion":
case "Assertion", "AsyncAssertion":
k.Assertions = append(k.Assertions, fn.Name())
case "GomegaMatcher":
k.Matchers = append(k.Matchers, fn.Name())
Expand Down
12 changes: 6 additions & 6 deletions syntax/ginkgo.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
" This file was generated by gensyntax.go on Wed, 31 Mar 2021 19:57:51 +0000
" This file was generated by gensyntax.go on Tue, 06 Jul 2021 17:48:24 +0000
" DO NOT modify this file by hand!
" Instead, edit ginkgo.vim.tpl and/or run: go generate

Expand All @@ -14,24 +14,24 @@ unlet! b:current_syntax
syntax keyword ginkgoCallbacks AfterEach AfterSuite BeforeEach BeforeSuite JustBeforeEach SynchronizedAfterSuite SynchronizedBeforeSuite
highlight link ginkgoCallbacks Identifier

syntax keyword ginkgoGroups By Context Describe It Specify When
syntax keyword ginkgoGroups By Context Describe DescribeTable Entry It Specify When
highlight link ginkgoGroups Statement

syntax keyword ginkgoFocusedGroups FContext FDescribe FIt FMeasure FSpecify FWhen
syntax keyword ginkgoFocusedGroups FContext FDescribe FDescribeTable FEntry FIt FMeasure FSpecify FWhen
highlight link ginkgoFocusedGroups Underlined

syntax keyword ginkgoPendingGroups PContext PDescribe PIt PMeasure PSpecify PWhen
syntax keyword ginkgoPendingGroups PContext PDescribe PDescribeTable PEntry PIt PMeasure PSpecify PWhen
highlight link ginkgoPendingGroups Todo

syntax keyword ginkgoDisabledGroups XContext XDescribe XIt XMeasure XSpecify XWhen
syntax keyword ginkgoDisabledGroups XContext XDescribe XDescribeTable XEntry XIt XMeasure XSpecify XWhen
highlight link ginkgoDisabledGroups Comment

" Gomega assertions
syntax keyword gomegaAssertions Consistently ConsistentlyWithOffset Eventually EventuallyWithOffset Expect ExpectWithOffset Ω
highlight link gomegaAssertions Constant

" Gomega matchers
syntax keyword gomegaMatchers And BeADirectory BeARegularFile BeActive BeAnExistingFile BeAssignableToTypeOf BeClosed BeElementOf BeEmpty BeEnabled BeEquivalentTo BeFalse BeFound BeIdenticalTo BeNil BeNumerically BeSelected BeSent BeTemporally BeTrue BeVisible BeZero ConsistOf ContainElement ContainSubstring Equal EqualElement HaveAttribute HaveCSS HaveCap HaveCount HaveKey HaveKeyWithValue HaveLen HaveLoggedError HaveLoggedInfo HaveOccurred HavePopupText HavePrefix HaveSuffix HaveText HaveTitle HaveURL HaveWindowCount Ignore MatchAllElements MatchAllFields MatchAllKeys MatchElements MatchError MatchFields MatchJSON MatchKeys MatchRegexp MatchText MatchXML MatchYAML Not Or Panic PointTo Receive Reject SatisfyAll SatisfyAny Succeed WithTransform
syntax keyword gomegaMatchers And BeADirectory BeARegularFile BeActive BeAnExistingFile BeAssignableToTypeOf BeClosed BeElementOf BeEmpty BeEnabled BeEquivalentTo BeFalse BeFound BeIdenticalTo BeNil BeNumerically BeSelected BeSent BeTemporally BeTrue BeVisible BeZero ConsistOf ContainElement ContainElements ContainSubstring Equal EqualElement HaveAttribute HaveCSS HaveCap HaveCount HaveHTTPStatus HaveKey HaveKeyWithValue HaveLen HaveLoggedError HaveLoggedInfo HaveOccurred HavePopupText HavePrefix HaveSuffix HaveText HaveTitle HaveURL HaveWindowCount Ignore MatchAllElements MatchAllFields MatchAllKeys MatchElements MatchError MatchFields MatchJSON MatchKeys MatchRegexp MatchText MatchXML MatchYAML Not Or Panic PanicWith PointTo Receive Reject SatisfyAll SatisfyAny Succeed WithTransform
highlight link gomegaMatchers Constant

let b:current_syntax = 'ginkgo'
Expand Down
8 changes: 4 additions & 4 deletions syntax/ginkgo.vim.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ unlet! b:current_syntax
syntax keyword ginkgoCallbacks AfterEach AfterSuite BeforeEach BeforeSuite JustBeforeEach SynchronizedAfterSuite SynchronizedBeforeSuite
highlight link ginkgoCallbacks Identifier

syntax keyword ginkgoGroups By Context Describe It Specify When
syntax keyword ginkgoGroups By Context Describe DescribeTable Entry It Specify When
highlight link ginkgoGroups Statement

syntax keyword ginkgoFocusedGroups FContext FDescribe FIt FMeasure FSpecify FWhen
syntax keyword ginkgoFocusedGroups FContext FDescribe FDescribeTable FEntry FIt FMeasure FSpecify FWhen
highlight link ginkgoFocusedGroups Underlined

syntax keyword ginkgoPendingGroups PContext PDescribe PIt PMeasure PSpecify PWhen
syntax keyword ginkgoPendingGroups PContext PDescribe PDescribeTable PEntry PIt PMeasure PSpecify PWhen
highlight link ginkgoPendingGroups Todo

syntax keyword ginkgoDisabledGroups XContext XDescribe XIt XMeasure XSpecify XWhen
syntax keyword ginkgoDisabledGroups XContext XDescribe XDescribeTable XEntry XIt XMeasure XSpecify XWhen
highlight link ginkgoDisabledGroups Comment

" Gomega assertions
Expand Down