kana / vim-flavor

Taste the difference.
https://www.relishapp.com/kana/vim-flavor
MIT License
112 stars 11 forks source link

Running tests (Maybe a windows issue?) #69

Open joro550 opened 1 year ago

joro550 commented 1 year ago

Hey there I am attempting to run tests for a different project on my machine, I run the

vim-flavor test spec/

command and receive:

-------- Preparing dependencies
Checking versions...
  Use dhruvasagar/vim-testify ... failed
C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/shellutility.rb:10:in `sh': fatal: destination path 'C:/Users/Mark/.vim-flavor/repos/dhruvasagar_vim-testify' already exists and is not an empty directory. (RuntimeError)
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/flavor.rb:65:in `clone'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:156:in `complete_a_flavor_itself'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:140:in `complete_a_flavor'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:134:in `block in complete_flavors'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/enumerableextension.rb:35:in `<<'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/enumerableextension.rb:35:in `block (2 levels) in on_failure'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/enumerableextension.rb:33:in `loop'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/enumerableextension.rb:33:in `block in on_failure'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:133:in `each'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:133:in `each'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:133:in `flat_map'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:133:in `complete_flavors'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:90:in `complete'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:72:in `refresh_flavors'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:31:in `test'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/cli.rb:43:in `test'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/bin/vim-flavor:3:in `<top (required)>'
        from C:/Users/Mark/scoop/apps/ruby/current/gems/bin/vim-flavor:32:in `load'
        from C:/Users/Mark/scoop/apps/ruby/current/gems/bin/vim-flavor:32:in `<main>'

I tried to delete the folder seeing as that seemed to be causing the issue but it doesn't even seem to exist:

image

Just in case you need these detalis:

Ruby version: ruby --version ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]

vim-flavor version 4.0.2


Just as a point of interest I tried this in Cygwin and got a different error:

C:/Users/Mark/scoop/apps/ruby/3.2.2-1/lib/ruby/3.2.0/pathname.rb:532:in `relative_path_from': different prefix: "C:/" and "E:/shares/dev/lua/vimtest" (ArgumentError)

      raise ArgumentError, "different prefix: #{dest_prefix.inspect} and #{base_directory.inspect}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/flavorfile.rb:33:in `path_from'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:181:in `complete_a_flavor_dependencies'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:141:in `complete_a_flavor'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:134:in `block in complete_flavors'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/enumerableextension.rb:35:in `<<'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/enumerableextension.rb:35:in `block (2 levels) in on_failure'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/enumerableextension.rb:33:in `loop'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/enumerableextension.rb:33:in `block in on_failure'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:133:in `each'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:133:in `each'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:133:in `flat_map'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:133:in `complete_flavors'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:90:in `complete'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:72:in `refresh_flavors'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/facade.rb:31:in `test'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/lib/vim-flavor/cli.rb:43:in `test'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
        from C:/Users/Mark/scoop/persist/ruby/gems/gems/vim-flavor-4.0.2/bin/vim-flavor:3:in `<top (required)>'
        from C:/Users/Mark/scoop/persist/ruby/gems/bin/vim-flavor:32:in `load'
        from C:/Users/Mark/scoop/persist/ruby/gems/bin/vim-flavor:32:in `<main>'

Is this because I keep my coding projects on a different drive 😖

joro550 commented 1 year ago

Haha I actually moved the files to my c:\ drive and the answer is yes it does fail for that reason, but now I get:

vim-flavor.bat test spec/
-------- Preparing dependencies
Checking versions...
  Use dhruvasagar/vim-testify ... v0.4.0
  Use junegunn/vader.vim ... 0.3.0
  Use kana/vim-vspec ... v1.9.2
  Use thinca/vim-themis ... v1.7.0
  Use tpope/vim-fireplace ... v2.1
Deploying plugins...
  dhruvasagar/vim-testify v0.4.0 ... done
  junegunn/vader.vim 0.3.0 ... done
  kana/vim-vspec v1.9.2 ... done
  thinca/vim-themis v1.7.0 ... done
  tpope/vim-fireplace v2.1 ... done
Completed.
-------- Testing a Vim plugin
C:/Users/Mark/dev/vimtest/.vim-flavor/pack/flavors/start/kana_vim-vspec/bin/prove-vspec: line 25: $'\r': command not found
C:/Users/Mark/dev/vimtest/.vim-flavor/pack/flavors/start/kana_vim-vspec/bin/prove-vspec: line 28: $'\r': command not found
C:/Users/Mark/dev/vimtest/.vim-flavor/pack/flavors/start/kana_vim-vspec/bin/prove-vspec: line 29: $'\r': command not found
C:/Users/Mark/dev/vimtest/.vim-flavor/pack/flavors/start/kana_vim-vspec/bin/prove-vspec: line 30: $'\r': command not found
C:/Users/Mark/dev/vimtest/.vim-flavor/pack/flavors/start/kana_vim-vspec/bin/prove-vspec: line 31: $'\r': command not found
C:/Users/Mark/dev/vimtest/.vim-flavor/pack/flavors/start/kana_vim-vspec/bin/prove-vspec: line 32: syntax error near unexpected token `$'\r''
':/Users/Mark/dev/vimtest/.vim-flavor/pack/flavors/start/kana_vim-vspec/bin/prove-vspec: line 32: `error()