[PATCH] tests: unify test-fncache
Adrian Buehlmann
adrian at cadifra.com
Thu Aug 12 15:30:38 UTC 2010
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1281627012 -7200
# Node ID 632704840791a5ad79981ec658fc9dda1ff7902e
# Parent fd66a181f5750dd868ac14360d40660a581cc9ba
tests: unify test-fncache
diff --git a/tests/test-fncache.out b/tests/test-fncache.out
deleted file mode 100644
--- a/tests/test-fncache.out
+++ /dev/null
@@ -1,75 +0,0 @@
-% init repo1
-
-% add a; ci
-adding a
-
-% cat .hg/store/fncache
-data/a.i
-
-% add a.i/b; ci
-adding a.i/b
-
-% cat .hg/store/fncache
-data/a.i
-data/a.i.hg/b.i
-
-% add a.i.hg/c; ci
-adding a.i.hg/c
-
-% cat .hg/store/fncache
-data/a.i
-data/a.i.hg/b.i
-data/a.i.hg.hg/c.i
-
-% hg verify
-checking changesets
-checking manifests
-crosschecking files in changesets and manifests
-checking files
-3 files, 3 changesets, 3 total revisions
-
-% rm .hg/store/fncache
-
-% hg verify
-checking changesets
-checking manifests
-crosschecking files in changesets and manifests
-checking files
- data/a.i at 0: missing revlog!
- data/a.i.hg/c.i at 2: missing revlog!
- data/a.i/b.i at 1: missing revlog!
-3 files, 3 changesets, 3 total revisions
-3 integrity errors encountered!
-(first damaged changeset appears to be 0)
-% non store repo
-adding tst.d/foo
-.hg
-.hg/00changelog.i
-.hg/00manifest.i
-.hg/data
-.hg/data/tst.d.hg
-.hg/data/tst.d.hg/foo.i
-.hg/dirstate
-.hg/last-message.txt
-.hg/requires
-.hg/undo
-.hg/undo.branch
-.hg/undo.desc
-.hg/undo.dirstate
-% non fncache repo
-adding tst.d/Foo
-.hg
-.hg/00changelog.i
-.hg/dirstate
-.hg/last-message.txt
-.hg/requires
-.hg/store
-.hg/store/00changelog.i
-.hg/store/00manifest.i
-.hg/store/data
-.hg/store/data/tst.d.hg
-.hg/store/data/tst.d.hg/_foo.i
-.hg/store/undo
-.hg/undo.branch
-.hg/undo.desc
-.hg/undo.dirstate
diff --git a/tests/test-fncache b/tests/test-fncache.t
old mode 100755
new mode 100644
rename from tests/test-fncache
rename to tests/test-fncache.t
--- a/tests/test-fncache
+++ b/tests/test-fncache.t
@@ -1,70 +1,108 @@
-#!/bin/sh
+Init repo1:
-echo "% init repo1"
-hg init repo1
-cd repo1
+ $ hg init repo1
+ $ cd repo1
+ $ echo "some text" > a
+ $ hg add
+ adding a
+ $ hg ci -m first
+ $ cat .hg/store/fncache
+ data/a.i
-echo
-echo "% add a; ci"
-echo "some text" > a
-hg add
-hg ci -m first
+Testing a.i/b:
-echo
-echo "% cat .hg/store/fncache"
-cat .hg/store/fncache
+ $ mkdir a.i
+ $ echo "some other text" > a.i/b
+ $ hg add
+ adding a.i/b
+ $ hg ci -m second
+ $ cat .hg/store/fncache
+ data/a.i
+ data/a.i.hg/b.i
-echo
-echo "% add a.i/b; ci"
-mkdir a.i
-echo "some other text" > a.i/b
-hg add
-hg ci -m second
+Testing a.i.hg/c:
-echo
-echo "% cat .hg/store/fncache"
-cat .hg/store/fncache
+ $ mkdir a.i.hg
+ $ echo "yet another text" > a.i.hg/c
+ $ hg add
+ adding a.i.hg/c
+ $ hg ci -m third
+ $ cat .hg/store/fncache
+ data/a.i
+ data/a.i.hg/b.i
+ data/a.i.hg.hg/c.i
-echo
-echo "% add a.i.hg/c; ci"
-mkdir a.i.hg
-echo "yet another text" > a.i.hg/c
-hg add
-hg ci -m third
+Testing verify:
-echo
-echo "% cat .hg/store/fncache"
-cat .hg/store/fncache
+ $ hg verify
+ checking changesets
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+ 3 files, 3 changesets, 3 total revisions
-echo
-echo "% hg verify"
-hg verify
+ $ rm .hg/store/fncache
-echo
-echo "% rm .hg/store/fncache"
-rm .hg/store/fncache
+ $ hg verify
+ checking changesets
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+ data/a.i at 0: missing revlog!
+ data/a.i.hg/c.i at 2: missing revlog!
+ data/a.i/b.i at 1: missing revlog!
+ 3 files, 3 changesets, 3 total revisions
+ 3 integrity errors encountered!
+ (first damaged changeset appears to be 0)
+ $ cd ..
-echo
-echo "% hg verify"
-hg verify
+Non store repo:
-# try non store repo encoding
-cd ..
-echo % non store repo
-hg --config format.usestore=False init foo
-cd foo
-mkdir tst.d
-echo foo > tst.d/foo
-hg ci -Amfoo
-find .hg | sort
+ $ hg --config format.usestore=False init foo
+ $ cd foo
+ $ mkdir tst.d
+ $ echo foo > tst.d/foo
+ $ hg ci -Amfoo
+ adding tst.d/foo
+ $ find .hg | sort
+ .hg
+ .hg/00changelog.i
+ .hg/00manifest.i
+ .hg/data
+ .hg/data/tst.d.hg
+ .hg/data/tst.d.hg/foo.i
+ .hg/dirstate
+ .hg/last-message.txt
+ .hg/requires
+ .hg/undo
+ .hg/undo.branch
+ .hg/undo.desc
+ .hg/undo.dirstate
+ $ cd ..
-cd ..
-echo % non fncache repo
-hg --config format.usefncache=False init bar
-cd bar
-mkdir tst.d
-echo foo > tst.d/Foo
-hg ci -Amfoo
-find .hg | sort
+Non fncache repo:
-exit 0
+ $ hg --config format.usefncache=False init bar
+ $ cd bar
+ $ mkdir tst.d
+ $ echo foo > tst.d/Foo
+ $ hg ci -Amfoo
+ adding tst.d/Foo
+ $ find .hg | sort
+ .hg
+ .hg/00changelog.i
+ .hg/dirstate
+ .hg/last-message.txt
+ .hg/requires
+ .hg/store
+ .hg/store/00changelog.i
+ .hg/store/00manifest.i
+ .hg/store/data
+ .hg/store/data/tst.d.hg
+ .hg/store/data/tst.d.hg/_foo.i
+ .hg/store/undo
+ .hg/undo.branch
+ .hg/undo.desc
+ .hg/undo.dirstate
+ $ cd ..
+
More information about the Mercurial-devel
mailing list