[tor-commits] [tor/master] test_dir: Refactor common code out of the dir_format unit tests