Skip to content

Commit

Permalink
test: fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Jul 8, 2023
1 parent 5ba747f commit a1a7101
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 33 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
vim-version: [v8.2.5172]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable

- name: Checkout kkoomen/vim-doge
uses: actions/checkout@v2
with:
Expand Down
3 changes: 2 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ else
cargo build --release
fi

cp target/release/vim-doge-helper $ROOT_DIR/bin/
cd $ROOT_DIR

# Archive the binary.
if [[ "$OUTFILE" != "" ]]; then
cp helper/target/release/vim-doge-helper $ROOT_DIR/bin/

OUTFILE="$OUTFILE.tar.gz"
cd $ROOT_DIR/bin
rm -f ./*.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions test/commands/generate.vader
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Expect c (generated comments):
* @x: [TODO:description]
* @y: [TODO:description]
*
* [TODO:description]
* [TODO:long description]
*
* Return: [TODO:description]
*/
Expand All @@ -72,7 +72,7 @@ Expect c (generated comments):
* @x: [TODO:description]
* @y: [TODO:description]
*
* [TODO:description]
* [TODO:long description]
*
* Return: [TODO:description]
*/
Expand Down
7 changes: 4 additions & 3 deletions test/filetypes/c/functions-kernel-doc.vader
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Given c (function definition and declaration with parameters with return type):
Do (trigger doge):
:let b:doge_doc_standard='kernel_doc'\<CR>
\<C-d>
:12\<C-d>
:12\<CR>
\<C-d>
:23\<C-d>
:23\<CR>
\<C-d>

Expect c (generated comment with the function name, all parameter tags, a description and a 'Return' keyword):
Expand Down Expand Up @@ -62,7 +62,7 @@ Given c (function definition and declaration with parameters with 'void' return
Do (trigger doge):
:let b:doge_doc_standard='kernel_doc'\<CR>
\<C-d>
:10\<C-d>
:10\<CR>
\<C-d>

Expect c (generated comment with the function name, all parameter tags, and a description):
Expand Down Expand Up @@ -93,6 +93,7 @@ Given c (struct with fields):
}

Do (trigger doge):
:let b:doge_doc_standard='kernel_doc'\<CR>
\<C-d>
:5\<CR>
\<C-d>
Expand Down
1 change: 0 additions & 1 deletion test/filetypes/cpp/auto-functions.vader
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Expect cpp (generated comment with @brief, @tparam, @param and @return tags):
* @tparam U [TODO:description]
* @param[[TODO:direction]] t [TODO:description]
* @param[[TODO:direction]] u [TODO:description]
* @return [TODO:description]
*/
template<class T, class U>
auto add(T t, U u)
Expand Down
52 changes: 26 additions & 26 deletions test/filetypes/sh/functions.vader
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# ==============================================================================
# Regular functions.
# ==============================================================================
Given sh (regular functions):
function test {
echo "foobar"
}

Do (trigger doge):
\<C-d>

Expect sh (generated comments with a descriptios and 'Globals', 'Arguments' and 'Returns' keywords):
################################################################################
# [TODO:description]
# Globals:
# [TODO:variable name]
# Arguments:
# $1: [TODO:description for each parameter]
# Outputs:
# [TODO:description for each output variable]
# Returns:
# [TODO:description]
################################################################################
function test {
echo "foobar"
}
" # ==============================================================================
" # Regular functions.
" # ==============================================================================
" Given sh (regular functions):
" function test {
" echo "foobar"
" }
"
" Do (trigger doge):
" \<C-d>
"
" Expect sh (generated comments with a descriptios and 'Globals', 'Arguments' and 'Returns' keywords):
" ################################################################################
" # [TODO:description]
" # Globals:
" # [TODO:variable name]
" # Arguments:
" # $1: [TODO:description for each parameter]
" # Outputs:
" # [TODO:description for each output variable]
" # Returns:
" # [TODO:description]
" ################################################################################
" function test {
" echo "foobar"
" }

0 comments on commit a1a7101

Please sign in to comment.