Skip to content

Conversation

zchee
Copy link
Member

@zchee zchee commented May 2, 2019

Add AttachBuffer testcases.

@zchee zchee added the area/nvim label May 2, 2019
@zchee zchee requested a review from justinmk May 2, 2019 07:55
@zchee zchee self-assigned this May 2, 2019
@zchee zchee force-pushed the nvim/test-buf_attach branch from 2237b73 to b498ff7 Compare May 2, 2019 07:56
@zchee
Copy link
Member Author

zchee commented May 2, 2019

@zchee
Copy link
Member Author

zchee commented May 2, 2019

@justinmk
This testcases are bit ugly. Will fix to more better test code.

@justinmk
Copy link
Member

justinmk commented May 2, 2019

They seem fine to me, but ok :)

@zchee
Copy link
Member Author

zchee commented May 3, 2019

@justinmk
call t.Fatal into goroutine (In Python, threading? See https://tour.golang.org/concurrency) is ugly...
test is passed, but consider alter testcases :)

@zchee
Copy link
Member Author

zchee commented May 6, 2019

@justinmk changed called t.Fatal without goroutine. Ready to merge and PTAL.

Note: I'll send 9d77a07 PR later. then more adding testcase for new API and AttachBuffer.


go func() {
<-done
close(errc)
Copy link
Member Author

@zchee zchee May 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: close error channel on above goroutine.


for err := range errc {
if err != nil {
t.Fatal(err)
Copy link
Member Author

@zchee zchee May 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: catch the error on above goroutine.
If occur error, called t.Fatal on the main thread (Note that in Go, not thread, the main goroutine).

@zchee zchee force-pushed the nvim/test-buf_attach branch from bd9bac9 to 704a88c Compare May 6, 2019 22:32
@zchee zchee force-pushed the nvim/test-buf_attach branch from 704a88c to e8b4f83 Compare May 6, 2019 22:37
@zchee
Copy link
Member Author

zchee commented May 6, 2019

@justinmk Sorry, fixed a bits.

@zchee
Copy link
Member Author

zchee commented May 6, 2019

@justinmk Travis CI is pending... always TravisCI is slow. That's why I said want to switch to CircleCI.. :(

@zchee zchee changed the title [WIP] nvim: add AttachBuffer testcases nvim: add AttachBuffer testcases May 6, 2019
@zchee
Copy link
Member Author

zchee commented May 6, 2019

@justinmk CI is passed. ready to merge!

@justinmk justinmk merged commit c611899 into master May 7, 2019
@justinmk justinmk deleted the nvim/test-buf_attach branch May 7, 2019 06:46
@zchee
Copy link
Member Author

zchee commented May 7, 2019

@justinmk
Thanks :)
I will send PR which fully supported Neovim latest API. pls review when if you have time.


Also, I considing to port gen_doc of neovim core and generate godoc comment automatically.
Current godoc document is here. There are some differences from the core C source document.
https://godoc.org/github.com/neovim/go-client/nvim#Nvim

But this repo is for Go, I will make some changes different to between the C and Go languages spec.

@justinmk
Copy link
Member

justinmk commented May 7, 2019

Also, I considing to port gen_doc of neovim core and generate godoc comment automatically.

Good idea. But, I don't think porting it is good. nvim.net did something similar. But that means we have a lot of code doing the same thing.

I think instead Nvim should return docs in the nvIm_get_api_info result. Although it should be optional somehow (disabled by default).

@zchee
Copy link
Member Author

zchee commented May 7, 2019

@justinmk
Ah, yes. port of gen_doc python script(means use doxygen and parses xml) to Go is one of the plans.
generates by *.mpack, use nvim_get_api_info, I was considering which one to use.

Although it should be optional somehow (disabled by default).

Interesting, what arg(or whatever) enable output more details?

@justinmk
Copy link
Member

justinmk commented May 7, 2019

Interesting, what arg(or whatever) enable output more details?

It is not possible yet. But it's worth working on that rather than rewriting gen_vimdoc.py for all clients.

@zchee
Copy link
Member Author

zchee commented May 7, 2019

Ah I see. make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants