Add tests for $QUTE_COUNT

This commit is contained in:
wishfort36 2018-08-12 22:31:12 +02:00
parent 359eefe1ab
commit a9725ddb4a
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/bin/bash
if [ "$QUTE_COUNT" = "5" ]; then
echo "message-info 'Count is five!'" >> "$QUTE_FIFO"
elif [ "$QUTE_COUNT" = "None" ]; then
echo "message-info 'No count!'" >> "$QUTE_FIFO"
fi

View File

@ -47,6 +47,17 @@ Feature: :spawn
- data/hello.txt
- data/hello.txt (active)
@posix
Scenario: Running :spawn with userscript and count
When I run :spawn -u (testdata)/userscripts/hello_if_count with count 5
Then the message "Count is five!" should be shown
@posix
Scenario: Running :spawn with userscript and no count
When I run :spawn -u (testdata)/userscripts/hello_if_count
Then the message "No count!" should be shown
@windows
Scenario: Running :spawn with userscript on Windows
When I open data/hello.txt