Ticket #130: libnotify-arabic-testcase.diff

  • tests/test-arabic.c

    old new  
     1/* 
     2 * @file tests/test-basic.c Unit test: basics 
     3 * 
     4 * @Copyright (C) 2004 Mike Hearn <mike@navi.cx> 
     5 * 
     6 * Test Case by Djihed Afifi <djihed@gmail.com> 
     7 * 
     8 * This library is free software; you can redistribute it and/or 
     9 * modify it under the terms of the GNU Lesser General Public 
     10 * License as published by the Free Software Foundation; either 
     11 * version 2.1 of the License, or (at your option) any later version. 
     12 * 
     13 * This library is distributed in the hope that it will be useful, 
     14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     16 * Lesser General Public License for more details. 
     17 * 
     18 * You should have received a copy of the GNU Lesser General Public 
     19 * License along with this library; if not, write to the 
     20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
     21 * Boston, MA  02111-1307, USA. 
     22 */ 
     23 
     24#include <libnotify/notify.h> 
     25#include <stdio.h> 
     26#include <unistd.h> 
     27 
     28int main() { 
     29    NotifyNotification *n; 
     30 
     31    notify_init("Basics"); 
     32 
     33    n = notify_notification_new ("اختبار",  
     34                                     "يوفر ويكي عربآيز مناخا للنقاش وتبادل الخبرات والمعرفة حول اللغة العربية ولسانياتها ومايتعلّق بدعمها والإرتقاء بها في الحوسبة عموماً والبرمجيات الحرة على وجه الخصوص. هذا الويكي عبارة عن بيئة تعاونية تشاركية مفتوحة للجميع بدون قيود، لغتنا الجميلة بانتظار مساهمتك فلا تبخل عليها ", 
     35                                     NULL, NULL); 
     36        notify_notification_set_timeout (n, 3000); //3 seconds 
     37 
     38    if (!notify_notification_show (n, NULL)) { 
     39        fprintf(stderr, "failed to send notification\n"); 
     40        return 1; 
     41    } 
     42 
     43    g_object_unref(G_OBJECT(n)); 
     44 
     45    return 0; 
     46} 
  • tests/Makefile.am

    old new  
    1212    test-urgency \ 
    1313    test-xy \ 
    1414    test-xy-actions \ 
    15     test-xy-stress 
     15    test-xy-stress \ 
     16    test-arabic 
    1617 
    1718common_ldflags = \ 
    1819    $(top_builddir)/libnotify/libnotify.la \ 
     
    6162test_xy_stress_SOURCES = test-xy-stress.c 
    6263test_xy_stress_LDADD = $(common_ldflags) 
    6364 
     65test_arabic_SOURCES = test-arabic.c 
     66test_arabic_LDADD = $(common_ldflags) 
     67 
    6468EXTRA_DIST = applet-critical.png 
    6569 
    6670INCLUDES = $(PACKAGE_CFLAGS)    \