[Fontconfig] Consistency between .uuid and cache name test

LRN lrn1986 at gmail.com
Fri Mar 8 18:02:38 UTC 2019


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20190308/41de87ed/attachment.sig>


More information about the Fontconfig mailing list