[perl-Glib] Test that a default log handler can call Glib::Log::default_handler



commit 544a6c31ef121a8d3778e0cbea050ad72b9670d4
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sun Dec 12 15:55:35 2010 +0100

    Test that a default log handler can call Glib::Log::default_handler

 t/a.t |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/t/a.t b/t/a.t
index 792e60d..bd46ce9 100644
--- a/t/a.t
+++ b/t/a.t
@@ -128,6 +128,11 @@ SKIP: {
       \&Glib::Log::default_handler,
       'default log handler: install undef, prev default');
   Glib->log ('Another-Unknown-Domain', ['info'], 'this is yet another a test message');
+
+  # test that a custom log handler can safely call the default log handler
+  Glib::Log->set_default_handler(sub { Glib::Log::default_handler (@_); });
+  Glib->log ('Another-Unknown-Domain', ['info'], 'custom to default test');
+  Glib::Log->set_default_handler(undef);
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]