X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Ftests%2Fscannerapi.c;h=0505e47d1f8a43c70f221b3ffa09bde0de954d28;hb=ea4f9ce8a060d53cbc299e4c384089f6cc926caa;hp=81023e70906c039c7f68342d9be2ce3bc7f191f1;hpb=ea06ec80634ff8f22882f3bc92effb10ac294e41;p=platform%2Fupstream%2Fglib.git
diff --git a/glib/tests/scannerapi.c b/glib/tests/scannerapi.c
index 81023e7..0505e47 100644
--- a/glib/tests/scannerapi.c
+++ b/glib/tests/scannerapi.c
@@ -14,9 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library; if not, see .
*/
#include
#include
@@ -59,20 +57,18 @@ test_scanner_warn (ScannerFixture *fix,
}
static void
-test_scanner_error_child (ScannerFixture *fix,
- gconstpointer test_data)
-{
- int pe = fix->scanner->parse_errors;
- g_scanner_error (fix->scanner, "scanner-error-message-test");
- g_assert_cmpint (fix->scanner->parse_errors, ==, pe + 1);
- exit (0);
-}
-
-static void
test_scanner_error (ScannerFixture *fix,
gconstpointer test_data)
{
- g_test_trap_subprocess ("/scanner/error:child", 0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR);
+ if (g_test_subprocess ())
+ {
+ int pe = fix->scanner->parse_errors;
+ g_scanner_error (fix->scanner, "scanner-error-message-test");
+ g_assert_cmpint (fix->scanner->parse_errors, ==, pe + 1);
+ exit (0);
+ }
+
+ g_test_trap_subprocess (NULL, 0, 0);
g_test_trap_assert_passed ();
g_test_trap_assert_stderr ("*scanner-error-message-test*");
}
@@ -139,7 +135,6 @@ main (int argc,
g_test_add ("/scanner/warn", ScannerFixture, 0, scanner_fixture_setup, test_scanner_warn, scanner_fixture_teardown);
g_test_add ("/scanner/error", ScannerFixture, 0, scanner_fixture_setup, test_scanner_error, scanner_fixture_teardown);
- g_test_add ("/scanner/error:child", ScannerFixture, 0, scanner_fixture_setup, test_scanner_error_child, scanner_fixture_teardown);
g_test_add ("/scanner/symbols", ScannerFixture, 0, scanner_fixture_setup, test_scanner_symbols, scanner_fixture_teardown);
g_test_add ("/scanner/tokens", ScannerFixture, 0, scanner_fixture_setup, test_scanner_tokens, scanner_fixture_teardown);