source: spip-zone/_plugins_/hash_documents/trunk/hasher_tests.php

Last change on this file was 63200, checked in by yffic@…, 8 years ago

Version compatible Spip 3

File size: 664 bytes
Line 
1<?php
2
3/*
4
5## tests pour hasher les documents
6@require 'ecrire/inc_version.php';
7include_spip('hash_fonctions');
8
9# hasher_adresser_document
10foreach (array(
11        'IMG/mp3/toto.mp3' => 'mp3/1/c/9/toto.mp3',
12        'mp3/toto.mp3' => 'mp3/1/c/9/toto.mp3',
13        'IMG/mp3/a/b/c/toto.mp3' => false,
14        'x' => false,
15) as $s => $r) {
16        if (($a = hasher_adresser_document($s)) !== $r)
17                echo 'hasher_adresser_document: '.var_export($s, true).' => '.var_export($a, true).' != '.var_export($r, true)."\n";
18}
19
20#var_dump(hasher_deplacer_document(1));
21
22spip_timer('hash');
23var_dump(count(hasher_deplacer_n_documents(10000, true)));
24var_dump(spip_timer('hash'));
25*/
26?>
Note: See TracBrowser for help on using the repository browser.