summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Jon McCann <jmccann@redhat.com>2010-06-23 19:06:42 -0400
committerWilliam Jon McCann <jmccann@redhat.com>2010-06-23 19:06:42 -0400
commitd521157ec62f4c25efa4f55df948ac63e2cba7c8 (patch)
tree79df17f572113c1eec3642b2f53ebd6895f3521e
parent180b2a9244b901adf17d5aca4268b0a9a7f5fd2b (diff)
downloadlibnotify-d521157ec62f4c25efa4f55df948ac63e2cba7c8.tar.gz
Add test-rtl.c
Missing from 3de71571ea822dd55d0a325553414e34b66d888a
-rw-r--r--tests/test-rtl.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/test-rtl.c b/tests/test-rtl.c
new file mode 100644
index 0000000..0e29f38
--- /dev/null
+++ b/tests/test-rtl.c
@@ -0,0 +1,49 @@
+/*
+ * @file tests/test-basic.c Unit test: basics
+ *
+ * @Copyright (C) 2004 Mike Hearn <mike@navi.cx>
+ *
+ * Test Case by Djihed Afifi <djihed@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * 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.
+ */
+
+#include <libnotify/notify.h>
+#include <stdio.h>
+#include <unistd.h>
+
+int
+main ()
+{
+ NotifyNotification *n;
+
+ notify_init("Basics");
+
+ n = notify_notification_new ("اختبار",
+ "يوفر ويكي عربآيز مناخا للنقاش وتبادل الخبرات والمعرفة حول اللغة العربية ولسانياتها ومايتعلّق بدعمها والإرتقاء بها في الحوسبة عموماً والبرمجيات الحرة على وجه الخصوص. هذا الويكي عبارة عن بيئة تعاونية تشاركية مفتوحة للجميع بدون قيود، لغتنا الجميلة بانتظار مساهمتك فلا تبخل عليها ",
+ NULL,
+ NULL);
+ notify_notification_set_timeout (n, 3000);
+
+ if (!notify_notification_show (n, NULL)) {
+ fprintf (stderr, "failed to send notification\n");
+ return 1;
+ }
+
+ g_object_unref (G_OBJECT (n));
+
+ return 0;
+}