]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Add a manual test for reverting git commits
authorSimon McVittie <smcv@debian.org>
Mon, 19 Dec 2016 15:33:28 +0000 (15:33 +0000)
committerSimon McVittie <smcv@debian.org>
Mon, 19 Dec 2016 18:21:07 +0000 (18:21 +0000)
Signed-off-by: Simon McVittie <smcv@debian.org>
.gitignore
t/manual/git_revert/Makefile [new file with mode: 0644]
t/manual/git_revert/index.mdwn [new file with mode: 0644]

index b54b830fdd7a3582705a3031b9806b1fd4488905..5ddda1bdd1673dcc515edbec82eed897d32f547c 100644 (file)
@@ -1,5 +1,5 @@
 ikiwiki.setup
-Makefile
+/Makefile
 Makefile.old
 blib/*
 /cover_db
@@ -24,3 +24,5 @@ po/underlays/directives/ikiwiki/directive/*.mdwn
 po/underlays_copy_stamp
 underlays/locale
 /t/tmp/
+/t/manual/*/git/
+/t/manual/*/html/
diff --git a/t/manual/git_revert/Makefile b/t/manual/git_revert/Makefile
new file mode 100644 (file)
index 0000000..9e2220d
--- /dev/null
@@ -0,0 +1,26 @@
+export PERL5LIB=$(CURDIR)/../../..
+ikiwiki = $(CURDIR)/../../../ikiwiki.in
+
+all:
+       rm -fr git html
+       mkdir -p git
+       echo "/doc/.ikiwiki/" > git/.gitignore
+       mkdir -p git/doc
+       mkdir -p git/doc/writable
+       cd git && git init
+       cp index.mdwn git/doc/index.mdwn
+       echo "This is the first test page" > git/doc/writable/one.mdwn
+       echo "This is the second test page" > git/doc/writable/two.mdwn
+       cd git && git add doc && git commit -m 'Initial commit'
+       $(ikiwiki) --setup ikiwiki.setup
+       echo "This is the first test page, it was first" > git/doc/writable/one.mdwn
+       cd git && git add doc && git commit -m 'First web commit'
+       $(ikiwiki) --setup ikiwiki.setup
+       echo "This is the second test page, it came second" > git/doc/writable/two.mdwn
+       cd git && git add doc && git commit -m 'Second web commit'
+       $(ikiwiki) --setup ikiwiki.setup
+       cd git && git mv doc/writable/one.mdwn doc/one.mdwn
+       cd git && git mv doc/writable/two.mdwn two.mdwn
+       cd git && git commit -m Rename
+       $(ikiwiki) --setup ikiwiki.setup
+       w3m html/index.html
diff --git a/t/manual/git_revert/index.mdwn b/t/manual/git_revert/index.mdwn
new file mode 100644 (file)
index 0000000..41c063a
--- /dev/null
@@ -0,0 +1,8 @@
+== Git revert manual test instructions ==
+
+* Look at the recent changes, below, in w3m
+* Try to revert each of the two web commits
+* Expected result: both fail
+
+[[!inline pages="internal(recentchanges/change_*) and !*/Discussion"
+template=recentchanges show=0]]