Add some trivial tests for git-if-needed.

Change-Id: I5f8fde2aebb3ab051aa5afbc7d5a093f454cfbbb
diff --git a/tools/git-if-needed/tests/data/add-readme.patch b/tools/git-if-needed/tests/data/add-readme.patch
new file mode 100644
index 0000000..a4ed37c
--- /dev/null
+++ b/tools/git-if-needed/tests/data/add-readme.patch
@@ -0,0 +1,22 @@
+From c07b8768c7d2718eaea27fcec8d804c0adbdd577 Mon Sep 17 00:00:00 2001
+From: Peter Penchev <openstack-dev@storpool.com>
+Date: Fri, 29 Nov 2019 23:23:48 +0200
+Subject: [PATCH 1/2] Add the README.txt file.
+
+Change-Id: If8c2dee7d1e70d88e0bd0f662373237e105be13d
+---
+ README.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+ create mode 100644 README.txt
+
+diff --git a/README.txt b/README.txt
+new file mode 100644
+index 0000000..e16c97f
+--- /dev/null
++++ b/README.txt
+@@ -0,0 +1,2 @@
++This is a sample Git repository for testing the operation of
++the git-if-needed tool.
+-- 
+2.24.0
+
diff --git a/tools/git-if-needed/tests/data/another-file.patch b/tools/git-if-needed/tests/data/another-file.patch
new file mode 100644
index 0000000..6cd5bce
--- /dev/null
+++ b/tools/git-if-needed/tests/data/another-file.patch
@@ -0,0 +1,21 @@
+From 2c8b59ff960b22a39f143ce1667963c259bb2bcc Mon Sep 17 00:00:00 2001
+From: Peter Penchev <openstack-dev@storpool.com>
+Date: Tue, 3 Dec 2019 12:31:35 +0200
+Subject: [PATCH] Add another file.
+
+Change-Id: I4953764f89bbac8b8d939657356c68c81255f1b4
+---
+ TODO.txt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 TODO.txt
+
+diff --git a/TODO.txt b/TODO.txt
+new file mode 100644
+index 0000000..bd1ee7c
+--- /dev/null
++++ b/TODO.txt
+@@ -0,0 +1 @@
++Do some things.
+-- 
+2.24.0
+
diff --git a/tools/git-if-needed/tests/data/conflict-in-readme.patch b/tools/git-if-needed/tests/data/conflict-in-readme.patch
new file mode 100644
index 0000000..335e905
--- /dev/null
+++ b/tools/git-if-needed/tests/data/conflict-in-readme.patch
@@ -0,0 +1,21 @@
+From 7acc0c08b31c46a358e496cf69fb2750bfdbe823 Mon Sep 17 00:00:00 2001
+From: Peter Penchev <openstack-dev@storpool.com>
+Date: Fri, 29 Nov 2019 23:25:13 +0200
+Subject: [PATCH] Make a conflicting change to the README file.
+
+Change-Id: I74a6d83a52acb5c72d088c0c3d1d74f10c5f592f
+---
+ README.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/README.txt b/README.txt
+index e16c97f..0ed1e0e 100644
+--- a/README.txt
++++ b/README.txt
+@@ -1,2 +1,2 @@
+ This is a sample Git repository for testing the operation of
+-the git-if-needed tool.
++the git-if-needed tool. There is nothing more to it.
+-- 
+2.24.0
+
diff --git a/tools/git-if-needed/tests/data/modify-readme.patch b/tools/git-if-needed/tests/data/modify-readme.patch
new file mode 100644
index 0000000..101253e
--- /dev/null
+++ b/tools/git-if-needed/tests/data/modify-readme.patch
@@ -0,0 +1,22 @@
+From 1616666e77742002b1d02b8bdd3092048cfa3f3f Mon Sep 17 00:00:00 2001
+From: Peter Penchev <openstack-dev@storpool.com>
+Date: Fri, 29 Nov 2019 23:24:27 +0200
+Subject: [PATCH 2/2] Make a change to the README file.
+
+Change-Id: I7b1587d3f10e717fc4d28b51aac38ae9247fc843
+---
+ README.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/README.txt b/README.txt
+index e16c97f..38358ac 100644
+--- a/README.txt
++++ b/README.txt
+@@ -1,2 +1,4 @@
+ This is a sample Git repository for testing the operation of
+ the git-if-needed tool.
++
++No need to wonder about the meaning behind it all, is there?
+-- 
+2.24.0
+