Consistency between .uuid and cache name test

LRN <[email protected]> Fri, 8 Mar 2019 21:02:38 +0300
Newsgroups gmane.comp.fonts.fontconfig
Message-ID <[email protected]>
What is it testing for?

prep #cleanup
cp $FONT1 $FONTDIR #put 1 font into fontdir
$FCCACHE $FONTDIR #create a cache for that fontdir
cat $FONTDIR/.uuid #print the contents of the .uuid file (why?)
$FCCACHE -r $FONTDIR #re-create a cache for that fontdir
uuid=`cat $FONTDIR/.uuid` #get the contents of the .uuid file
ls $CACHEDIR/$uuid*
if [ $? != 0 ]; then #verify that a UUID-based cache subdir exists
  echo "*** Test failed: $TEST"
  echo "No cache for $uuid"
  ls $CACHEDIR
  exit 1
fi
n=`ls -1 $CACHEDIR/*cache-* | wc -l` #count the number of cache subdirs
if [ $n != 1 ]; then #verify that only one cache subdir exists
  echo "*** Test failed: $TEST"
  echo "Unexpected cache was created"
  ls $CACHEDIR
  exit 1
fi

Why is it checking that only one cache subdir exists? The second invocation of
fc-cache, with -r, deletes the old cache and creates a new one. I can't see why
this test expects that only one cache will exist after this.

_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE4MWzR43wYaAzEA49ja3pJ2dZunQFAlyCrj4ACgkQja3pJ2dZ
unSVdA/7BSqoZ/LGmx9978Po3lOHxQqA8wTu3PiTsDs1iLweNdHMX2yadB7QdmdC
4NOE6jyQ1Ic1Tknf+mozGF3tFkn6v05A7rkA8mx+E49DyjSyZXdubaDSXLp6PxC/
BseRfIBk2rn0OY8TF3bCM9evxD2pTVBlh+CVSaWggGDaZBvInu6I1sXFWWZa9xkF
KDPd+Q+uPidbR/fo+OMkH67FX/y5pwmxfvWW0e9YrMvd21pKkwdPKL6XLw6U0EX+
BCdFX7jZMkdys9FWXA4yc2aFUkn6elEIz5u0fB/FMvz8VVIodNYI5ydeGd97x1Ku
efhT3GDxCX78iRf4fFBEk/hGFwQMYDsmLcc8RpF6kqQZjY1RcAzhGxwB3IrMKL5w
SoR1EtyKZmOkjsyFqmSqR5raBgZ1KA+iRZTVFXc4oqp6/qIKCi2k8MDe7VreYAbx
a0Ija09G0SdGbNL5cbJS5iYfHt+zPevOZd/LTYq11lqo2C6KoYYjxZVl/pXXGbfz
PanX09Ji2BWJqteSa/kxhrsdvXgVX+lzoSVur2k/ByvGXwz4zMW815pR0YFBfcQr
Y+Gl78ahOGioALMhGr5qoUYWs8WvsJ9Qs5o6fBaq9oROExCXG1Pab48szkikVPZM
LsZa4MbGwHZ707j3R3lh5yeoyvhUBkuqZlPz7mpNXYWzNnjUfmk=
=xCek
-----END PGP SIGNATURE-----