Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvasagar committed Nov 1, 2023
1 parent 5f8bbf2 commit a79ac26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
path: pack/plugins/start/vim-prosession

- name: Checkout vim-testify
- name: Checkout vim-obsession
uses: actions/checkout@v3
with:
repository: tpope/vim-obsession
Expand All @@ -43,9 +43,15 @@ jobs:
neovim: true
version: nightly

- name: Extract Git Branch Name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Run unit tests
env:
VIM: ${{ steps.vim.outputs.executable }}
GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
run: |
cd ${{ github.workspace }}/pack/plugins/start/vim-prosession
echo "set packpath+=${{ github.workspace }}" > vimrc
Expand Down
2 changes: 1 addition & 1 deletion t/autoload/prosession_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ call testify#teardown(function('s:teardown'))

function! s:TestGetCurrBranch()
let out = prosession#GetCurrBranch(".")
call testify#assert#equals(out, "master")
call testify#assert#equals(out, $GIT_BRANCH)
endfunction
call testify#it('prosession#GetCurBranch should get the current git branch', function('s:TestGetCurrBranch'))

0 comments on commit a79ac26

Please sign in to comment.