mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -315,6 +315,25 @@ abbr func TestXYZ(t *testing.T) { ... }
|
||||
func Test${1:Function}(t *testing.T) {
|
||||
${0}
|
||||
}
|
||||
# test table snippet
|
||||
snippet tt
|
||||
abbr var test = {...}{...} for {t.Run(){...}}
|
||||
var tests = []struct {
|
||||
name string
|
||||
expected string
|
||||
given string
|
||||
}{
|
||||
{"${2}", "${3}", "${4}",},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T){
|
||||
actual := ${1:Function}(tt.given)
|
||||
if actual != tt.expected {
|
||||
t.Errorf("given(%s): expected %s, actual %s", tt.given, tt.expected, actual)
|
||||
}
|
||||
})
|
||||
}
|
||||
# test server
|
||||
snippet tsrv
|
||||
abbr ts := httptest.NewServer(...)
|
||||
|
Reference in New Issue
Block a user