#!/bin/sh # Running this file will create "testdir" directory with bunch # of files inside. Open them all to see if something broke. # Kind of smoke test. # Langs covered here: # asp.lang changelog.lang c.lang cpp.lang desktop.lang diff.lang dtd.lang # gap.lang gtkrc.lang html.lang ini.lang latex.lang m4.lang # makefile.lang ms.lang perl.lang po.lang prolog.lang python.lang sh.lang # texinfo.lang xml.lang yacc.lang libtool.lang pkgconfig.lang # objc.lang chdr.lang testv1.lang t2t.lang fortran.lang forth.lang # octave.lang dir="testdir" mkdir -p $dir/ cat > $dir/file.prolog < $dir/file.asp < <% dim d set d=Server.CreateObject("Scripting.Dictionary") d.Add "o", "Orange" d.Add "a", "Apple" if d.Exists("o")= true then Response.Write("Key exists.") else Response.Write("Key does not exist.") end if set d=nothing %> EOFEOF cat > $dir/file.octave < $dir/file.t2t <<\EOFEOF ! gtk-source-lang: t2t %!include ``something`` % Comment ``verbatim`` //italic// ``` verbatim block ``` EOFEOF cat > $dir/file.f < $dir/file.frt < $dir/file.testv1 < $dir/file.cc < class A : B { public: A(); private: foobar() const; }; EOFEOF cat > $dir/file.c < int main (void) { int a = 0x89; int b = 089; int c = 89.; int d = 'a'; printf ("Hello %s!\n", "world"); return 0; } EOFEOF cat > $dir/file.m < #import @interface Lalala : Object - (BOOL) sayHello; @end @implementation Lalala : Object - (BOOL) sayHello { printf ("Hello there!\n"); return YES; } @end int main (void) { Lalala *obj = [[Lalala alloc] init]; [obj sayHello]; [obj free]; return 0; } EOFEOF cat > $dir/file.h < #import @interface Lalala : Object - (void) sayHello; @end class Boo { void hello (); }; EOFEOF cat > $dir/ChangeLog < * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event): cancel editing (ie. don't accept changes) when the entry loses focus. (Fixes #164494, reported by Chris Rouch). 2006-12-10 Matthias Clasen * configure.in: Correct a misapplied patch. EOFEOF cat > $dir/file.g < $dir/file.html < Hi there! Hi there! EOFEOF cat > $dir/file.tex < $dir/file.m4 < $dir/file.sh < $dir/Makefile < $dir/file.py <> sys.stderr, "Hi there!" None, True, False Hello().hello() EOFEOF cat > $dir/file.xml < momomomo EOFEOF cat > $dir/file.y < #define FOO_BAR(x,y) printf ("x, y") %} %name-prefix="foolala" %error-verbose %lex-param {FooLaLa *lala} %parse-param {FooLaLa *lala} /* %expect 1 */ %union { int ival; const char *str; } %token ATOKEN %token ATOKEN2 %type program stmt %type if_stmt %token IF THEN ELSE ELIF FI %token WHILE DO OD FOR IN %token CONTINUE BREAK RETURN %token EQ NEQ LE GE %token AND OR NOT %token UMINUS %token TWODOTS %left '-' '+' %left '*' '/' %left '%' %left EQ NEQ '<' '>' GE LE %left OR %left AND %left NOT %left '#' %left UMINUS %% script: program { _ms_parser_set_top_node (parser, \$1); } ; program: stmt_or_error { \$\$ = node_list_add (parser, NULL, \$1); } | program stmt_or_error { \$\$ = node_list_add (parser, MS_NODE_LIST (\$1), \$2); } ; stmt_or_error: error ';' { \$\$ = NULL; } | stmt ';' { \$\$ = $1; } ; variable: IDENTIFIER { \$\$ = node_var (parser, \$1); } ; %% EOFEOF cat > $dir/file.desktop < $dir/file.diff < $dir/gtkrc < $dir/file.ini < $dir/file.pl <$title\n\n" if $title; $last = {}; # the last indexterm we processed $first = 1; # this is the first one $group = ""; # we're not in a group yet $lastout = ""; # we've not put anything out yet @seealsos = (); # See also stack. # Termcount is > 0 iff some entries were skipped. $quiet || print STDERR "$termcount entries ignored...\n"; &end_entry(); print OUT "\n" if $lettergroups; print OUT "\n"; close (OUT); $quiet || print STDERR "Done.\n"; sub same { my($a) = shift; my($b) = shift; my($aP) = $a->{'psortas'} || $a->{'primary'}; my($aS) = $a->{'ssortas'} || $a->{'secondary'}; my($aT) = $a->{'tsortas'} || $a->{'tertiary'}; my($bP) = $b->{'psortas'} || $b->{'primary'}; my($bS) = $b->{'ssortas'} || $b->{'secondary'}; my($bT) = $b->{'tsortas'} || $b->{'tertiary'}; my($same); $aP =~ s/^\s*//; $aP =~ s/\s*$//; $aP = uc($aP); $aS =~ s/^\s*//; $aS =~ s/\s*$//; $aS = uc($aS); $aT =~ s/^\s*//; $aT =~ s/\s*$//; $aT = uc($aT); $bP =~ s/^\s*//; $bP =~ s/\s*$//; $bP = uc($bP); $bS =~ s/^\s*//; $bS =~ s/\s*$//; $bS = uc($bS); $bT =~ s/^\s*//; $bT =~ s/\s*$//; $bT = uc($bT); # print "[$aP]=[$bP]\n"; # print "[$aS]=[$bS]\n"; # print "[$aT]=[$bT]\n"; # Two index terms are the same if: # 1. the primary, secondary, and tertiary entries are the same # (or have the same SORTAS) # AND # 2. They occur in the same titled section # AND # 3. They point to the same place # # Notes: Scope is used to suppress some entries, but can't be used # for comparing duplicates. # Interpretation of "the same place" depends on whether or # not $linkpoints is true. $same = (($aP eq $bP) && ($aS eq $bS) && ($aT eq $bT) && ($a->{'title'} eq $b->{'title'}) && ($a->{'href'} eq $b->{'href'})); # If we're linking to points, they're only the same if they link # to exactly the same spot. $same = $same && ($a->{'hrefpoint'} eq $b->{'hrefpoint'}) if $linkpoints; if ($same) { warn "$me: duplicated index entry found: $aP $aS $aT\n"; } $same; } sub tsame { # Unlike same(), tsame only compares a single term my($a) = shift; my($b) = shift; my($term) = shift; my($sterm) = substr($term, 0, 1) . "sortas"; my($A, $B); $A = $a->{$sterm} || $a->{$term}; $B = $b->{$sterm} || $b->{$term}; $A =~ s/^\s*//; $A =~ s/\s*$//; $A = uc($A); $B =~ s/^\s*//; $B =~ s/\s*$//; $B = uc($B); return $A eq $B; } =head1 EXAMPLE B B<-o> F F =head1 EXIT STATUS =over 5 =item B<0> Success =item B<1> Failure =back =head1 AUTHOR Norm Walsh Endw@nwalsh.comE Minor updates by Adam Di Carlo Eadam@onshore.comE and Peter Eisentraut Epeter_e@gmx.netE =cut EOFEOF cat > $dir/file.po <, YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-12-17 09:49-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: ../medit/medit.desktop.in.h:1 msgid "Text editor" msgstr "" #: ../medit/medit.desktop.in.h:2 msgid "medit" msgstr "" EOFEOF cat > $dir/file.texi < $dir/file.dtd < EOFEOF cat > $dir/file.la < $dir/file.pc <= 8.0.2 fontconfig libpng12 xrender >= 0.6 x11 Libs: -L${libdir} -lcairo Libs.private: -lz -lm Cflags: -I${includedir}/cairo EOFEOF cat > $dir/file.spec <= 2.3.0 BuildRequires: libgnome-vfs2-devel >= 2.2.0 BuildRequires: libgnomeprintui-devel >= 2.7.0 BuildRequires: perl-XML-Parser Conflicts: gtksourceview-sharp <= 0.5-3mdk %description GtkSourceview is a library that adds syntax highlighting, line numbers, and other programming-editor features. GtkSourceView specializes these features for a code editor. %package -n %{lib_name} Summary: Source code viewing library Group: Editors Requires: %{name} >= %{version}-%{release} Provides: lib%{name} = %{version}-%{release} Provides: libgtksourceview0 = %{version}-%{release} Obsoletes: libgtksourceview0 Provides: libgtksourceview1.0 = %{version}-%{release} Obsoletes: libgtksourceview1.0 %description -n %{lib_name} GtkSourceview is a library that adds syntax highlighting, line numbers, and other programming-editor features. GtkSourceView specializes these features for a code editor. %package -n %{lib_name}-devel Summary: Libraries and include files for GtkSourceView Group: Development/GNOME and GTK+ Requires: %{lib_name} = %{version} Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: lib%{name}-%{api_version}-devel = %{version}-%{release} Provides: libgtksourceview0-devel = %{version}-%{release} Obsoletes: libgtksourceview0-devel Provides: libgtksourceview1.0-devel = %{version}-%{release} Obsoletes: libgtksourceview1.0-devel %description -n %{lib_name}-devel GtkSourceView development files %prep %setup -q %build %configure2_5x %make %install rm -rf %{buildroot} %makeinstall_std %{find_lang} %{name}-%{api_version} %post -n %{lib_name} -p /sbin/ldconfig %postun -n %{lib_name} -p /sbin/ldconfig %clean rm -rf %{buildroot} %files -f %{name}-%{api_version}.lang %defattr(-,root,root) %doc AUTHORS ChangeLog NEWS README TODO %{_datadir}/gtksourceview-%{api_version} %files -n %{lib_name} %defattr(-,root,root) %{_libdir}/*.so.* %files -n %{lib_name}-devel %defattr(-,root,root) %doc %{_datadir}/gtk-doc/html/gtksourceview %{_libdir}/*.so %attr(644,root,root) %{_libdir}/*.la %{_includedir}/* %{_libdir}/pkgconfig/* %changelog * Tue Aug 08 2006 Götz Waschk 1.7.2-1mdv2007.0 - New release 1.7.2 * Tue Jul 25 2006 Götz Waschk 1.7.1-1mdk - New release 1.7.1 EOFEOF