// should be empty to start
        REQUIRE( global_mapping.empty() );
        REQUIRE( global_cache.empty() );
        REQUIRE( local_mapping.empty() );
        REQUIRE( local_cache.empty() );

        std::string fontdir("fonts/");

        REQUIRE( mapnik::util::exists( fontdir ) );
        REQUIRE( mapnik::util::is_directory( fontdir ) );

        // test map cached fonts
        REQUIRE( m.register_fonts(fontdir , false ) );
        REQUIRE( m.get_font_memory_cache().size() == 0 );
        REQUIRE( m.get_font_file_mapping().size() == 1 );
        REQUIRE( m.load_fonts() );
        REQUIRE( m.get_font_memory_cache().size() == 1 );
        REQUIRE( m.register_fonts(fontdir , true ) );
        REQUIRE( m.get_font_file_mapping().size() == 22 );
        REQUIRE( m.load_fonts() );
        REQUIRE( m.get_font_memory_cache().size() == 22 );

        // copy discards memory cache but not file mapping
        mapnik::Map m2(m);
        REQUIRE( m2.get_font_memory_cache().size() == 0 );
        REQUIRE( m2.get_font_file_mapping().size() == 22 );
        REQUIRE( m2.load_fonts() );
        REQUIRE( m2.get_font_memory_cache().size() == 22 );

        // test font-directory from XML
        mapnik::Map m3(1,1);