Comments (3)
With last version, i've got this output when i run go-test-current-file with the cursor inside ExampleB
package main
import (
"fmt"
"testing"
)
func TestA(t *testing.T) {
fmt.Println("test a")
}
func TestAB(t *testing.T) {
fmt.Println("test ab")
}
func ExampleB() {
fmt.Println("Example")
// Output: Example
}
func BenchmarkHello(b *testing.B) {
for i := 0; i < b.N; i++ {
fmt.Sprintf("hello")
}
}
$ go test -run='TestA|TestAB|ExampleB'
test a
test ab
PASS
ok _/home/nlamirault/gotest.el/var 0.002s
in a shell :
go test -v -run='TestA|TestAB|ExampleA'
=== RUN TestA
test a
--- PASS: TestA (0.00s)
=== RUN TestAB
test ab
--- PASS: TestAB (0.00s)
=== RUN ExampleA
--- PASS: ExampleA (0.00s)
PASS
ok _/home/nlamirault/Perso/gotest.el/var 0.002s
With -u
argument (using C-u M-x go-test-current-file) :
go test -v -run='TestA|TestAB|ExampleA'
=== RUN TestA
test a
--- PASS: TestA (0.00s)
=== RUN TestAB
test ab
--- PASS: TestAB (0.00s)
=== RUN ExampleA
--- PASS: ExampleA (0.00s)
PASS
ok _/home/nlamirault/Perso/gotest.el/var 0.004s
from gotest.el.
Sorry, I meant go-test-current-test
function, not go-test-current-file
. The title of the issue is correct, but the body mentioned wrong function.
from gotest.el.
Also I am not sure if go-test-current-file
should run benchmarks. A separate function would be more usable as benchmarks usually long running.
from gotest.el.
Related Issues (20)
- go-test-* Always opens a new buffer HOT 2
- Improve usability when executed from a non-test file.
- go-test-current-test can not print fmt.Print content HOT 1
- Please add a prefix to test-helper.el to avoid conflicts with 68 other packages HOT 2
- Default to previously set coverage file HOT 2
- Cannot detect environment variables
- Always show `Compiling` on modeline
- support -count HOT 1
- Support compilation mode hyperlinks for more testify cases
- go-test-current-test doesn't work if the current test is part of a testify test suite
- GO111MODULE=on if go.mod found
- go-test-current-test cache the previous command HOT 2
- go-test-current-coverage overwrites file with "mode: set" HOT 2
- go-test-current-project is only running the test on parent directory
- Can I set go-test-args globally in emacs config?
- Edit the go test command from the Go Test buffer
- subtest support HOT 1
- Dependency Dashboard
- CVE-2022-28948 (High) detected in github.com/go-yaml/yaml-v3.0.0
- How to quit a long-running unit test?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotest.el.