function testRangeToList() { $s = '93865-93932'; $expected = array(array(93865, 93932)); $a = GSB_Updater::range2list($s); $this->assertEquals($expected, $a); $s = '1-3,5-6,9,11'; $expected = array(array(1, 3), array(5, 6), array(9, 9), array(11, 11)); $a = GSB_Updater::range2list($s); $this->assertEquals($expected, $a); $s = '1'; $expected = array(array(1, 1)); $a = GSB_Updater::range2list($s); $this->assertEquals($expected, $a); }
#!/usr/bin/env php <?php require_once 'intro.php'; $x = new GSB_Updater($storage, $network, $logger); // get new chunks $x->downloadData($gsblists, FALSE); // zap outdated fullhash definitions (they are only good for 45m) $storage->fullhash_delete_old();