mirror of
https://github.com/ivuorinen/nvim-shellspec.git
synced 2026-01-30 14:43:50 +00:00
feat: add first-class Neovim support with enhanced formatting
- Add modern Lua implementation with modular architecture - Implement HEREDOC preservation and smart comment indentation - Create dual implementation (Neovim Lua + VimScript fallback) - Add comprehensive health check and configuration system - Enhance formatting engine with state machine for context awareness - Update documentation with Lua configuration examples - Add memory files for development workflow and conventions
This commit is contained in:
35
test_example.spec.sh
Executable file
35
test_example.spec.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
Describe "ShellSpec formatting test"
|
||||
# This is a top-level comment
|
||||
Context "when testing HEREDOC support"
|
||||
# Comment inside Context
|
||||
It "should preserve HEREDOC formatting"
|
||||
# Comment inside It block
|
||||
When call cat <<EOF
|
||||
This indentation should be preserved
|
||||
Even with deeper indentation
|
||||
Back to original level
|
||||
EOF
|
||||
The output should include "preserved"
|
||||
End
|
||||
|
||||
It "should handle quoted HEREDOC"
|
||||
When call cat <<'DATA'
|
||||
# This comment inside HEREDOC should not be touched
|
||||
Some $variable should not be expanded
|
||||
DATA
|
||||
The output should include "variable"
|
||||
End
|
||||
End
|
||||
|
||||
Context "when testing regular formatting"
|
||||
# Another context comment
|
||||
It "should indent comments properly"
|
||||
# This comment should be indented to It level
|
||||
When call echo "test"
|
||||
# Another comment at It level
|
||||
The output should equal "test"
|
||||
End
|
||||
End
|
||||
End
|
||||
Reference in New Issue
Block a user