mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-02-04 08:47:39 +00:00
- Add full ShellSpec grammar extending tree-sitter-bash - Support all ShellSpec constructs: Describe, Context, It, hooks, utilities - Include Data block parsing with statements and argument styles - Add 61 comprehensive test cases covering real-world patterns - Implement optimized GitHub workflows with CI/CD automation - Configure complete development tooling (linting, formatting, pre-commit) - Add comprehensive documentation and contribution guidelines - Optimize grammar conflicts to zero warnings - Support editor integration for Neovim, VS Code, Emacs Breaking Changes: - Initial release, no previous API to break BREAKING CHANGE: Initial implementation of tree-sitter-shellspec grammar # Conflicts: # .github/workflows/codeql.yml # .github/workflows/pr-lint.yml # .pre-commit-config.yaml # Conflicts: # .github/workflows/pr-lint.yml # Conflicts: # .github/workflows/pr-lint.yml
19 lines
434 B
Bash
19 lines
434 B
Bash
#shellcheck shell=sh
|
|
|
|
Describe 'mock stub example'
|
|
unixtime() { date +%s; }
|
|
get_next_day() { echo $(($(unixtime) + 86400)); }
|
|
|
|
Example 'redefine date command'
|
|
date() { echo 1546268400; }
|
|
When call get_next_day
|
|
The stdout should eq 1546354800
|
|
End
|
|
|
|
Example 'use the date command'
|
|
# Date is not redefined because this is another subshell
|
|
When call unixtime
|
|
The stdout should not eq 1546268400
|
|
End
|
|
End
|