mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 14:43:35 +08:00 
			
		
		
		
	Updated plugins and added vim-markdown
This commit is contained in:
		| @ -0,0 +1,7 @@ | ||||
| package foo | ||||
|  | ||||
| import "fmt" | ||||
|  | ||||
| func MissingFooDoc() { | ||||
| 	fmt.Println("missing doc") | ||||
| } | ||||
| @ -0,0 +1,7 @@ | ||||
| package lint | ||||
|  | ||||
| import "fmt" | ||||
|  | ||||
| func MissingDoc() { | ||||
| 	fmt.Println("missing doc") | ||||
| } | ||||
| @ -0,0 +1,7 @@ | ||||
| package lint | ||||
|  | ||||
| import "fmt" | ||||
|  | ||||
| func AlsoMissingDoc() { | ||||
| 	fmt.Println("missing doc") | ||||
| } | ||||
							
								
								
									
										1
									
								
								sources_non_forked/vim-go/autoload/go/test-fixtures/test/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								sources_non_forked/vim-go/autoload/go/test-fixtures/test/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| /pkg | ||||
| @ -0,0 +1,7 @@ | ||||
| package main | ||||
|  | ||||
| import "fmt" | ||||
|  | ||||
| func main() { | ||||
| 	fmt.Println("vim-go" | ||||
| } | ||||
| @ -0,0 +1,7 @@ | ||||
| package mock | ||||
|  | ||||
| import "testing" | ||||
|  | ||||
| func Fail(t *testing.T) { | ||||
| 	t.Fatal("another package badness") | ||||
| } | ||||
| @ -0,0 +1,59 @@ | ||||
| package play | ||||
|  | ||||
| import ( | ||||
| 	"sync" | ||||
| 	"testing" | ||||
|  | ||||
| 	"play/mock" | ||||
| ) | ||||
|  | ||||
| func TestTopSubHelper(t *testing.T) { | ||||
| 	t.Run("sub", func(t *testing.T) { | ||||
| 		t.Log("log message") | ||||
| 		t.Error("sub badness") | ||||
| 	}) | ||||
| 	t.Error("badness") | ||||
| 	helper(t) | ||||
| } | ||||
|  | ||||
| func TestMultiline(t *testing.T) { | ||||
| 	t.Error("this is an error\nand a second line, too") | ||||
| 	t.Error("\nthis is another error") | ||||
| } | ||||
|  | ||||
| func TestSub(t *testing.T) { | ||||
| 	t.Run("indented", func(t *testing.T) { | ||||
| 		t.Error("this is a sub-test error\nand a second line, too") | ||||
| 	}) | ||||
| } | ||||
|  | ||||
| func TestOK(t *testing.T) { | ||||
| 	t.Run("log", func(t *testing.T) { | ||||
| 		t.Log("goodness") | ||||
| 	}) | ||||
| } | ||||
|  | ||||
| // TestMocked tests behavior similar to what users may experience when using | ||||
| // github.com/golang/mock/gomock. | ||||
| func TestMocked(t *testing.T) { | ||||
| 	mock.Fail(t) | ||||
| } | ||||
|  | ||||
| func TestPanic(t *testing.T) { | ||||
| 	panic("worst ever") | ||||
| } | ||||
|  | ||||
| func TestConcurrentPanic(t *testing.T) { | ||||
| 	var wg sync.WaitGroup | ||||
| 	wg.Add(1) | ||||
| 	go func() { | ||||
| 		panic("concurrent fail") | ||||
| 		wg.Done() | ||||
| 	}() | ||||
| 	wg.Wait() | ||||
| } | ||||
|  | ||||
| func helper(t *testing.T) { | ||||
| 	t.Helper() | ||||
| 	t.Fatal("helper badness") | ||||
| } | ||||
| @ -0,0 +1,11 @@ | ||||
| package main | ||||
|  | ||||
| import "testing" | ||||
|  | ||||
| func TestHelloWorld(t *testing.T) { | ||||
| 	t.Error("so long") | ||||
|  | ||||
| 	t.Run("sub", func(t *testing.T) { | ||||
| 		t.Error("thanks for all the fish") | ||||
| 	}) | ||||
| } | ||||
| @ -0,0 +1,47 @@ | ||||
| // Run a few parallel tests, all in parallel, using multiple techniques for | ||||
| // causing the test to take a while so that the stacktraces resulting from a | ||||
| // test timeout will contain several goroutines to avoid giving a false sense | ||||
| // of confidence or creating error formats that don't account for the more | ||||
| // complex scenarios that can occur with timeouts. | ||||
|  | ||||
| package main | ||||
|  | ||||
| import ( | ||||
| 	"testing" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| func TestSleep(t *testing.T) { | ||||
| 	t.Parallel() | ||||
| 	time.Sleep(15 * time.Second) | ||||
| 	t.Log("expected panic if run with timeout < 15s") | ||||
| } | ||||
|  | ||||
| func TestRunning(t *testing.T) { | ||||
| 	t.Parallel() | ||||
| 	c := time.After(15 * time.Second) | ||||
| Loop: | ||||
| 	for { | ||||
| 		select { | ||||
| 		case <-c: | ||||
| 			break Loop | ||||
| 		default: | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	t.Log("expected panic if run with timeout < 15s") | ||||
| } | ||||
|  | ||||
| func TestRunningAlso(t *testing.T) { | ||||
| 	t.Parallel() | ||||
| 	c := time.After(15 * time.Second) | ||||
| Loop: | ||||
| 	for { | ||||
| 		select { | ||||
| 		case <-c: | ||||
| 			break Loop | ||||
| 		default: | ||||
| 		} | ||||
| 	} | ||||
| 	t.Log("expected panic if run with timeout < 15s") | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Amir Salihefendic
					Amir Salihefendic