Code Monkey home page Code Monkey logo

Comments (7)

vfbiby avatar vfbiby commented on June 5, 2024

bats-run-simple-test

I use bats to run a very simple test to assert the vspec's output is equale to expected output, but failed.

from vim-vspec.

kana avatar kana commented on June 5, 2024

Would you mind running the following command and pasting its result as text?

./t/vspec-path-never-duplicated.t | od -tax1

This should print the following output:

$ ./t/vspec-path-never-duplicated.t | od -tax1
0000000   o   k  sp   1  nl   1   .   .   1  nl
         6f  6b  20  31  0a  31  2e  2e  31  0a
0000012

On your environment, you'll get something different. The actual difference seems to be invisible if it is directly printed to terminal.

from vim-vspec.

vfbiby avatar vfbiby commented on June 5, 2024

it have so much things! kana

vim_projects/vim-vspec ‹master*› » ./t/vspec-path-never-duplicated.t | od -tax1
0000000    n   o   t  sp   o   k  sp   1  nl   #  sp   -   -   -  sp   /
           6e  6f  74  20  6f  6b  20  31  0a  23  20  2d  2d  2d  20  2f
0000020    d   e   v   /   f   d   /   6   2  ht   2   0   2   0   -   0
           64  65  76  2f  66  64  2f  36  32  09  32  30  32  30  2d  30
0000040    9   -   1   0  sp   2   3   :   3   5   :   1   5   .   0   0
           39  2d  31  30  20  32  33  3a  33  35  3a  31  35  2e  30  30
0000060    0   0   0   0   0   0   0  sp   +   0   8   0   0  nl   #  sp
           30  30  30  30  30  30  30  20  2b  30  38  30  30  0a  23  20
0000100    +   +   +  sp   /   d   e   v   /   f   d   /   6   1  ht   2
           2b  2b  2b  20  2f  64  65  76  2f  66  64  2f  36  31  09  32
0000120    0   2   0   -   0   9   -   1   0  sp   2   3   :   3   5   :
           30  32  30  2d  30  39  2d  31  30  20  32  33  3a  33  35  3a
0000140    1   5   .   0   0   0   0   0   0   0   0   0  sp   +   0   8
           31  35  2e  30  30  30  30  30  30  30  30  30  20  2b  30  38
0000160    0   0  nl   #  sp   @   @  sp   -   1   ,   2  sp   +   1   ,
           30  30  0a  23  20  40  40  20  2d  31  2c  32  20  2b  31  2c
0000200    4  sp   @   @  nl   #  sp   -   o   k  sp   1  sp   -  sp   .
           34  20  40  40  0a  23  20  2d  6f  6b  20  31  20  2d  20  2e
0000220    /   b   i   n   /   v   s   p   e   c  sp   e   x   c   l   u
           2f  62  69  6e  2f  76  73  70  65  63  20  65  78  63  6c  75
0000240    d   e   s  sp   e   x   p   l   i   c   i   t   l   y  sp   s
           64  65  73  20  65  78  70  6c  69  63  69  74  6c  79  20  73
0000260    p   e   c   i   f   i   e   d  sp   v   s   p   e   c  sp   p
           70  65  63  69  66  69  65  64  20  76  73  70  65  63  20  70
0000300    a   t   h  nl   #  sp   -   1   .   .   1  nl   #  sp   +  cr
           61  74  68  0a  23  20  2d  31  2e  2e  31  0a  23  20  2b  0d
0000320   cr  nl   #  sp   +   o   k  sp   1  sp   -  sp   .   /   b   i
           0d  0a  23  20  2b  6f  6b  20  31  20  2d  20  2e  2f  62  69
0000340    n   /   v   s   p   e   c  sp   e   x   c   l   u   d   e   s
           6e  2f  76  73  70  65  63  20  65  78  63  6c  75  64  65  73
0000360   sp   e   x   p   l   i   c   i   t   l   y  sp   s   p   e   c
           20  65  78  70  6c  69  63  69  74  6c  79  20  73  70  65  63
0000400    i   f   i   e   d  sp   v   s   p   e   c  sp   p   a   t   h
           69  66  69  65  64  20  76  73  70  65  63  20  70  61  74  68
0000420   cr  nl   #  sp   +   1   .   .   1  cr  nl   #  sp   +  cr  nl
           0d  0a  23  20  2b  31  2e  2e  31  0d  0a  23  20  2b  0d  0a
0000440    #  sp   \  sp   N   o  sp   n   e   w   l   i   n   e  sp   a
           23  20  5c  20  4e  6f  20  6e  65  77  6c  69  6e  65  20  61
0000460    t  sp   e   n   d  sp   o   f  sp   f   i   l   e  nl   1   .
           74  20  65  6e  64  20  6f  66  20  66  69  6c  65  0a  31  2e
0000500    .   1  nl
           2e  31  0a
0000503

from vim-vspec.

kana avatar kana commented on June 5, 2024

Thank you for the quick response. There are unexpected CRs in your output, and they are invisible in the screenshots. For example:

0000300    a   t   h  nl   #  sp   -   1   .   .   1  nl   #  sp   +  cr
           61  74  68  0a  23  20  2d  31  2e  2e  31  0a  23  20  2b  0d
0000320   cr  nl   #  sp   +   o   k  sp   1  sp   -  sp   .   /   b   i
           0d  0a  23  20  2b  6f  6b  20  31  20  2d  20  2e  2f  62  69

The problem seems to be caused by some command other than Vim, because I couldn't reproduce the problem with the same version of Vim you used. I'll investigate it later.

from vim-vspec.

vfbiby avatar vfbiby commented on June 5, 2024

thank you so much.
I write a simple diff test, it passed.

simple-diff-test

from vim-vspec.

kana avatar kana commented on June 5, 2024

I've pushed a fix for the problem. Please try the latest version vim-vspec.

from vim-vspec.

vfbiby avatar vfbiby commented on June 5, 2024

all-t-tests-pass

all pass! so cool

from vim-vspec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.