Test fails in the normal build but passes in the huge build

16 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Dec 1, 2019, 2:27:50 AM12/1/19
to vim_dev
Hi all,

In the PR 5296, I have added some tests for the register related
functionality. One of the test fails in the normal build but passes
in the huge build. The test is below:

new
let @" = 'xyz'
set virtualedit=all
call append(0, "a\tb")
call cursor(1, 2, 6)
normal p
call assert_equal("a\txyzb", getline(1))

It looks like in the normal build, the tab character is expanded
when the text is pasted. But this doesn't happen in the huge build.

Is this a bug or am I missing something?

The passing huge build log is at:

https://travis-ci.org/vim/vim/jobs/619155561

The failing normal build log is at:

https://travis-ci.org/vim/vim/jobs/619155568

The PR is at:

https://github.com/vim/vim/pull/5296

Thanks,
Yegappan

Yegappan Lakshmanan

unread,
Dec 1, 2019, 12:07:11 PM12/1/19
to vim_dev, Christian Brabandt
Hi,

On Sat, Nov 30, 2019 at 11:27 PM Yegappan Lakshmanan
<yega...@gmail.com> wrote:
>
> Hi all,
>
> In the PR 5296, I have added some tests for the register related
> functionality. One of the test fails in the normal build but passes
> in the huge build. The test is below:
>
> new
> let @" = 'xyz'
> set virtualedit=all
> call append(0, "a\tb")
> call cursor(1, 2, 6)
> normal p
> call assert_equal("a\txyzb", getline(1))
>
> It looks like in the normal build, the tab character is expanded
> when the text is pasted. But this doesn't happen in the huge build.
>
> Is this a bug or am I missing something?
>

The 'vartabstop' feature is causing the above change in behavior.
I am going to add a check for the 'vartabstop' feature in the
test script. But I think this is a bug.

- Yegappan

Bram Moolenaar

unread,
Dec 1, 2019, 12:17:03 PM12/1/19
to vim...@googlegroups.com, Yegappan Lakshmanan
It's because of the vartabs feature, it computes the tabstop position
correctly. Code is in do_put(), at line 1679.

I managed to fix the code, I'll include the tests then.


--
hundred-and-one symptoms of being an internet addict:
165. You have a web page burned into your glasses

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Yegappan Lakshmanan

unread,
Dec 1, 2019, 12:28:59 PM12/1/19
to Bram Moolenaar, vim_dev
Hi Bram,

On Sun, Dec 1, 2019 at 9:17 AM Bram Moolenaar <Br...@moolenaar.net> wrote:
>
>
> Yegappan wrote:
>
> > In the PR 5296, I have added some tests for the register related
> > functionality. One of the test fails in the normal build but passes
> > in the huge build. The test is below:
> >
> > new
> > let @" = 'xyz'
> > set virtualedit=all
> > call append(0, "a\tb")
> > call cursor(1, 2, 6)
> > normal p
> > call assert_equal("a\txyzb", getline(1))
> >
> > It looks like in the normal build, the tab character is expanded
> > when the text is pasted. But this doesn't happen in the huge build.
> >
> > Is this a bug or am I missing something?
> >
> > The passing huge build log is at:
> >
> > https://travis-ci.org/vim/vim/jobs/619155561
> >
> > The failing normal build log is at:
> >
> > https://travis-ci.org/vim/vim/jobs/619155568
> >
> > The PR is at:
> >
> > https://github.com/vim/vim/pull/5296
>
> It's because of the vartabs feature, it computes the tabstop position
> correctly. Code is in do_put(), at line 1679.
>
> I managed to fix the code, I'll include the tests then.
>

Thanks for fixing it.

Regards,
Yegappan
Reply all
Reply to author
Forward
0 new messages