login
Header Space

 
 

[PATCH] new test from the submodule chapter of the user manual

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: <git@...>, Johannes Schindelin <Johannes.Schindelin@...>, J. Bruce Fields <bfields@...>
Date: Thursday, September 20, 2007 - 1:08 pm

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

On Thu, Sep 20, 2007 at 11:34:25AM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

what about this?

 t/t3060-subprojects-tutorial.sh |   62 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)
 create mode 100755 t/t3060-subprojects-tutorial.sh

diff --git a/t/t3060-subprojects-tutorial.sh b/t/t3060-subprojects-tutorial.sh
new file mode 100755
index 0000000..2fcf4ab
--- /dev/null
+++ b/t/t3060-subprojects-tutorial.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Miklos Vajna
+#
+
+test_description='A simple subprojects tutorial in the form of a test case'
+
+. ./test-lib.sh
+
+test_expect_success "create the submodules" '
+	for i in a b c d
+	do
+		mkdir $i &&
+		cd $i &&
+		git init &&
+		echo "module $i" > $i.txt &&
+		git add $i.txt &&
+		git commit -m "Initial commit, submodule $i" &&
+		cd ..
+	done
+'
+
+test_expect_success "create the superproject" '
+	mkdir super &&
+	cd super &&
+	git init &&
+	for i in a b c d
+	do
+		git submodule add '`pwd`'/$i
+	done
+'
+
+test_expect_success "commit in the superproject" '
+	git commit -m "Add submodules a, b, c and d." &&
+	cd ..
+'
+
+test_expect_success "clone the superproject" '
+	git clone super cloned &&
+	cd cloned
+'
+
+test_expect_success "submodule init" '
+	git submodule init
+'
+
+test_expect_success "submodule update" '
+	git submodule update
+'
+
+test_expect_success "update the submodule from within the superproject" '
+	cd a &&
+	echo "adding a line again" >> a.txt &&
+	git commit -a -m "Updated the submodule from within the superproject." &&
+	git push &&
+	cd .. &&
+	git add a &&
+	git commit -m "Updated submodule a." &&
+	git push
+'
+
+test_done
-- 
1.5.3.2.80.g077d6f-dirty

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[rfc] git submodules howto, Miklos Vajna, (Tue Sep 18, 6:55 am)
Re: [rfc] git submodules howto, Uwe , (Mon Sep 24, 3:11 am)
Re: [rfc] git submodules howto, Miklos Vajna, (Mon Sep 24, 4:30 am)
Re: [rfc] git submodules howto, J. Bruce Fields, (Tue Sep 18, 9:29 am)
Re: [rfc] git submodules howto, Miklos Vajna, (Tue Sep 18, 11:47 am)
Re: [rfc] git submodules howto, J. Bruce Fields, (Tue Sep 18, 11:55 am)
Re: [rfc] git submodules howto, Miklos Vajna, (Tue Sep 18, 12:11 pm)
Re: [rfc] git submodules howto, Michael Smith, (Tue Sep 18, 2:12 pm)
[PATCH] User Manual: add a chapter for submodules, Miklos Vajna, (Wed Sep 19, 1:42 pm)
Re: [PATCH] User Manual: add a chapter for submodules, Sven Verdoolaege, (Wed Sep 19, 5:00 pm)
Re: [PATCH] User Manual: add a chapter for submodules, Junio C Hamano, (Wed Sep 19, 3:44 pm)
[PATCH] User Manual: add a chapter for submodules, Miklos Vajna, (Wed Sep 19, 8:34 pm)
Re: [PATCH] User Manual: add a chapter for submodules, Junio C Hamano, (Thu Sep 20, 12:15 am)
Re: [PATCH] User Manual: add a chapter for submodules, Miklos Vajna, (Thu Sep 20, 6:02 pm)
Re: [PATCH] User Manual: add a chapter for submodules, Johannes Schindelin, (Thu Sep 20, 6:34 am)
[PATCH] new test from the submodule chapter of the user manual, Miklos Vajna, (Thu Sep 20, 1:08 pm)
Re: [PATCH] new test from the submodule chapter of the user ..., Johannes Schindelin, (Thu Sep 20, 2:47 pm)
[PATCH] User Manual: add a chapter for submodules, Miklos Vajna, (Wed Sep 19, 8:01 pm)
Re: [PATCH] User Manual: add a chapter for submodules, J. Bruce Fields, (Wed Sep 19, 4:30 pm)
Re: [rfc] git submodules howto, Michael Smith, (Tue Sep 18, 8:10 am)
Re: [rfc] git submodules howto, Johannes Schindelin, (Tue Sep 18, 8:03 am)
speck-geostationary