Commit 7c758ec8a9e7cb2c21cc8b7d32429c0204f75869

Golmote 2015-08-27T08:14:23

Merge pull request #700 from Golmote/tests-git Add tests for git

diff --git a/tests/languages/git/command_feature.test b/tests/languages/git/command_feature.test
new file mode 100644
index 0000000..488f0be
--- /dev/null
+++ b/tests/languages/git/command_feature.test
@@ -0,0 +1,15 @@
+$ git add file.txt
+foo@foobar ~ $ git diff --cached
+$ git log -p -i
+
+----------------------------------------------------
+
+[
+	["command", ["$ git add file.txt"]],
+	["command", ["foo@foobar ~ $ git diff", ["parameter", " --cached"]]],
+	["command", ["$ git log", ["parameter", " -p"], ["parameter", " -i"]]]
+]
+
+----------------------------------------------------
+
+Checks for git commands, with and without parameters.
\ No newline at end of file
diff --git a/tests/languages/git/comment_feature.test b/tests/languages/git/comment_feature.test
new file mode 100644
index 0000000..c3d0358
--- /dev/null
+++ b/tests/languages/git/comment_feature.test
@@ -0,0 +1,17 @@
+# On branch gh-pages
+# Changes to be committed:
+#   (use "git reset HEAD <file>..." to unstage)
+#
+
+----------------------------------------------------
+
+[
+	["comment", "# On branch gh-pages"],
+	["comment", "# Changes to be committed:"],
+	["comment", "#   (use \"git reset HEAD <file>...\" to unstage)"],
+	["comment", "#"]
+]
+
+----------------------------------------------------
+
+Checks for comments.
\ No newline at end of file
diff --git a/tests/languages/git/commit_sha1_feature.test b/tests/languages/git/commit_sha1_feature.test
new file mode 100644
index 0000000..fbc58ed
--- /dev/null
+++ b/tests/languages/git/commit_sha1_feature.test
@@ -0,0 +1,15 @@
+commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09
+commit 87edc4ad8c71b95f6e46f736eb98b742859abd95
+commit 3102416a90c431400d2e2a14e707fb7fd6d9e06d
+
+----------------------------------------------------
+
+[
+	["commit_sha1", "commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09"],
+	["commit_sha1", "commit 87edc4ad8c71b95f6e46f736eb98b742859abd95"],
+	["commit_sha1", "commit 3102416a90c431400d2e2a14e707fb7fd6d9e06d"]
+]
+
+----------------------------------------------------
+
+Checks for commit SHA1.
\ No newline at end of file
diff --git a/tests/languages/git/coord_feature.test b/tests/languages/git/coord_feature.test
new file mode 100644
index 0000000..8d8c5e2
--- /dev/null
+++ b/tests/languages/git/coord_feature.test
@@ -0,0 +1,13 @@
+@@ -1 +1,2 @@
+@@@ -98,20 -98,12 +98,20 @@@
+
+----------------------------------------------------
+
+[
+	["coord", "@@ -1 +1,2 @@"],
+	["coord", "@@@ -98,20 -98,12 +98,20 @@@"]
+]
+
+----------------------------------------------------
+
+Checks for coords.
\ No newline at end of file
diff --git a/tests/languages/git/diff_feature.test b/tests/languages/git/diff_feature.test
new file mode 100644
index 0000000..3c75cca
--- /dev/null
+++ b/tests/languages/git/diff_feature.test
@@ -0,0 +1,15 @@
+-Here's my tetx file
++Here's my text file
++And this is the second line
+
+----------------------------------------------------
+
+[
+	["deleted", "-Here's my tetx file"],
+	["inserted", "+Here's my text file"],
+	["inserted", "+And this is the second line"]
+]
+
+----------------------------------------------------
+
+Checks for inserted and deleted lines in git diff output.
\ No newline at end of file
diff --git a/tests/languages/git/string_feature.test b/tests/languages/git/string_feature.test
new file mode 100644
index 0000000..ebff3bf
--- /dev/null
+++ b/tests/languages/git/string_feature.test
@@ -0,0 +1,17 @@
+""
+"foo"
+''
+'bar'
+
+----------------------------------------------------
+
+[
+	["string", "\"\""],
+	["string", "\"foo\""],
+	["string", "''"],
+	["string", "'bar'"]
+]
+
+----------------------------------------------------
+
+Checks for double-quoted and single-quoted strings.
\ No newline at end of file