--- a/tests/test-manifest.t Fri Mar 15 13:52:36 2019 +0000
+++ b/tests/test-manifest.t Thu Mar 14 11:46:18 2019 +0000
@@ -158,3 +158,24 @@
id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
total cache data size 268 bytes, on-disk 268 bytes
$ hg debugmanifestfulltextcache --clear
+
+Test caching behavior on actual operation
+-----------------------------------------
+
+Make sure we start empty
+
+ $ hg debugmanifestfulltextcache
+ cache empty
+
+Commit should have the new node cached:
+
+ $ echo a >> b/a
+ $ hg commit -m 'foo'
+ $ hg debugmanifestfulltextcache
+ cache contains 2 manifest entries, in order of most to least recent:
+ id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes
+ id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
+ total cache data size 314 bytes, on-disk 314 bytes
+ $ hg log -r 'ancestors(., 1)' --debug | grep 'manifest:'
+ manifest: 1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7
+ manifest: 2:26b8653b67af8c1a0a0317c4ee8dac50a41fdb65