Browse Source

Added unit tests

Yegappan Lakshmanan 3 years ago
parent
commit
6e6064a087
2 changed files with 1065 additions and 0 deletions
  1. 21
    0
      test/mru_unittest.sh
  2. 1044
    0
      test/unit_tests.vim

+ 21
- 0
test/mru_unittest.sh View File

@@ -0,0 +1,21 @@
1
+#!/bin/bash
2
+
3
+# Script to run unit-tests for the MRU Vim plugin
4
+
5
+VIM=/usr/bin/vim
6
+VIM_CMD="$VIM -N -u NONE -U NONE -i NONE"
7
+
8
+$VIM_CMD -S unit_tests.vim
9
+
10
+echo "MRU unit test results"
11
+cat results.txt
12
+
13
+echo
14
+grep FAIL results.txt > /dev/null 2>&1
15
+if [ $? -eq 0 ]
16
+then
17
+    echo "ERROR: Some test failed."
18
+else
19
+    echo "SUCCESS: All the tests passed."
20
+fi
21
+

+ 1044
- 0
test/unit_tests.vim
File diff suppressed because it is too large
View File