diff --git a/tools/i18n/t/AddTextdomainTest.php b/tools/i18n/t/AddTextdomainTest.php new file mode 100755 index 0000000000..1c991dd363 --- /dev/null +++ b/tools/i18n/t/AddTextdomainTest.php @@ -0,0 +1,24 @@ +atd = new AddTextdomain; + } + + function test_add() { + # copy to a new file, so that we don't corrupt the old one + copy( 'data/add-textdomain-0.php', 'data/add-textdomain-0-work.php' ); + $this->atd->process_file( 'test-domain', 'data/add-textdomain-0-work.php', true ); + $this->assertEquals( file_get_contents( 'data/add-textdomain-0-result.php' ), file_get_contents( 'data/add-textdomain-0-work.php' ) ); + unlink( 'data/add-textdomain-0-work.php' ); + } +} diff --git a/tools/i18n/t/data/add-textdomain-0-result.php b/tools/i18n/t/data/add-textdomain-0-result.php new file mode 100755 index 0000000000..4c20cb890e --- /dev/null +++ b/tools/i18n/t/data/add-textdomain-0-result.php @@ -0,0 +1,17 @@ +