[gtksourceview/wip/split-testfiles] Split testfiles.sh to tests/syntax-highlighting/



commit 629b7da544d75e20517260573b1579301c3dc3c6
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Jul 17 21:17:20 2014 +0200

    Split testfiles.sh to tests/syntax-highlighting/
    
    Why make it simple when it can be complicated?

 tests/Makefile.am                      |    1 +
 tests/syntax-highlighting/ChangeLog    |   11 +
 tests/syntax-highlighting/Makefile     |    4 +
 tests/syntax-highlighting/Makefile.am  |   23 +
 tests/syntax-highlighting/README       |    5 +
 tests/syntax-highlighting/file.Rnw     |   15 +
 tests/syntax-highlighting/file.asp     |   18 +
 tests/syntax-highlighting/file.bib     |   10 +
 tests/syntax-highlighting/file.c       |   13 +
 tests/syntax-highlighting/file.cc      |    8 +
 tests/syntax-highlighting/file.cg      |   17 +
 tests/syntax-highlighting/file.cob     |   25 +
 tests/syntax-highlighting/file.cu      |   14 +
 tests/syntax-highlighting/file.desktop |   12 +
 tests/syntax-highlighting/file.diff    |   12 +
 tests/syntax-highlighting/file.dtd     |   15 +
 tests/syntax-highlighting/file.f       |   25 +
 tests/syntax-highlighting/file.fcl     |   12 +
 tests/syntax-highlighting/file.frt     |    8 +
 tests/syntax-highlighting/file.fs      |    8 +
 tests/syntax-highlighting/file.g       |    3 +
 tests/syntax-highlighting/file.glslf   |   11 +
 tests/syntax-highlighting/file.go      |    8 +
 tests/syntax-highlighting/file.h       |   11 +
 tests/syntax-highlighting/file.html    |   17 +
 tests/syntax-highlighting/file.ijm     |   11 +
 tests/syntax-highlighting/file.impl    |   11 +
 tests/syntax-highlighting/file.ini     |   11 +
 tests/syntax-highlighting/file.json    |   12 +
 tests/syntax-highlighting/file.la      |   36 +
 tests/syntax-highlighting/file.ll      |   18 +
 tests/syntax-highlighting/file.m       |   21 +
 tests/syntax-highlighting/file.m4      |    4 +
 tests/syntax-highlighting/file.octave  |    3 +
 tests/syntax-highlighting/file.ooc     |   10 +
 tests/syntax-highlighting/file.pc      |   14 +
 tests/syntax-highlighting/file.pl      |  110 ++++
 tests/syntax-highlighting/file.po      |   24 +
 tests/syntax-highlighting/file.prg     |   28 +
 tests/syntax-highlighting/file.prolog  |    3 +
 tests/syntax-highlighting/file.py      |    9 +
 tests/syntax-highlighting/file.rq      |    9 +
 tests/syntax-highlighting/file.sci     |   14 +
 tests/syntax-highlighting/file.sh      |    2 +
 tests/syntax-highlighting/file.spec    |  105 +++
 tests/syntax-highlighting/file.svh     |   46 ++
 tests/syntax-highlighting/file.t2t     |    8 +
 tests/syntax-highlighting/file.testv1  |    9 +
 tests/syntax-highlighting/file.tex     |    4 +
 tests/syntax-highlighting/file.texi    |   51 ++
 tests/syntax-highlighting/file.xml     |    4 +
 tests/syntax-highlighting/file.y       |   58 ++
 tests/syntax-highlighting/gtkrc        |    9 +
 tests/testfiles.sh                     | 1115 --------------------------------
 54 files changed, 950 insertions(+), 1115 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 726b392..de12842 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -123,6 +123,7 @@ EXTRA_DIST =                                \
        language-specs/test-full.lang   \
        setup-file-saver.sh             \
        styles/classic.xml              \
+       syntax-highlighting             \
        test-completion.gresource.xml   \
        test-completion.ui              \
        test-search.gresource.xml       \
diff --git a/tests/syntax-highlighting/ChangeLog b/tests/syntax-highlighting/ChangeLog
new file mode 100644
index 0000000..28be4a4
--- /dev/null
+++ b/tests/syntax-highlighting/ChangeLog
@@ -0,0 +1,11 @@
+= Release =
+
+2006-12-10  Kristian Rietveld  <kris gtk org>
+
+       * 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  <mclasen redhat com>
+
+       * configure.in: Correct a misapplied patch.
diff --git a/tests/syntax-highlighting/Makefile b/tests/syntax-highlighting/Makefile
new file mode 100644
index 0000000..5e52d30
--- /dev/null
+++ b/tests/syntax-highlighting/Makefile
@@ -0,0 +1,4 @@
+all: foo bar
+foo: hello ; $(MAKE) bar
+bar:
+       echo "Hello world!"
diff --git a/tests/syntax-highlighting/Makefile.am b/tests/syntax-highlighting/Makefile.am
new file mode 100644
index 0000000..319be41
--- /dev/null
+++ b/tests/syntax-highlighting/Makefile.am
@@ -0,0 +1,23 @@
+ACLOCAL_AMFLAGS = -I m4
+
+EXTRA_DIST += README.W32
+
+if HAVE_DOXYGEN
+  DOXYDIR = docs
+endif
+
+doc_DATA = AUTHORS ChangeLog COPYING INSTALL NEWS README
+
+bin_PROGRAMS = jupiter
+jupiter_SOURCES = main.c
+jupiter_CPPFLAGS = -I$(top_srcdir)/common
+jupiter_LDADD = ../common/libjupcommon.a
+
+check_SCRIPTS = greptest.sh
+TESTS = $(check_SCRIPTS)
+
+greptest.sh:
+       echo './jupiter | grep "Hello from .*jupiter!"' > greptest.sh
+       chmod +x greptest.sh
+
+CLEANFILES = greptest.sh
diff --git a/tests/syntax-highlighting/README b/tests/syntax-highlighting/README
new file mode 100644
index 0000000..cfca161
--- /dev/null
+++ b/tests/syntax-highlighting/README
@@ -0,0 +1,5 @@
+This directory contains test files for the syntax highlighting.
+Open them to see if something broke. Kind of smoke test.
+
+If possible the file name should be "file.<extension>".
+But there are exceptions: ChangeLog, Makefile, Makefile.am, etc.
diff --git a/tests/syntax-highlighting/file.Rnw b/tests/syntax-highlighting/file.Rnw
new file mode 100644
index 0000000..7bc25ad
--- /dev/null
+++ b/tests/syntax-highlighting/file.Rnw
@@ -0,0 +1,15 @@
+\documentclass{article}
+\begin{document}
+Hi there!
+<<hello>>=
+    # Say hello
+    hello <- setClass("hello", slots = c(a="character", b="character"))
+    sayHi <- hello(a="Hello", b="World")
+    paste(sayHi a, sayHi b)
+    rm(hello)
+
+    hello <- list()
+    hello <- sayHi a
+@
+Hi again!
+\end{document}
diff --git a/tests/syntax-highlighting/file.asp b/tests/syntax-highlighting/file.asp
new file mode 100644
index 0000000..4bcccb4
--- /dev/null
+++ b/tests/syntax-highlighting/file.asp
@@ -0,0 +1,18 @@
+<html>
+<body>
+
+<%
+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
+%>
+
+</body>
+</html>
diff --git a/tests/syntax-highlighting/file.bib b/tests/syntax-highlighting/file.bib
new file mode 100644
index 0000000..5ace013
--- /dev/null
+++ b/tests/syntax-highlighting/file.bib
@@ -0,0 +1,10 @@
+%A .bib file might contain the following entry, which describes a mathematical handbook
+ Book{abramowitz+stegun,
+ author    = "Milton {Abramowitz} and Irene A. {Stegun}",
+ title     = "Handbook of Mathematical Functions with
+              Formulas, Graphs, and Mathematical Tables",
+ publisher = "Dover",
+ year      =  1964,
+ address   = "New York",
+ edition   = "ninth Dover printing, tenth GPO printing"
+}
diff --git a/tests/syntax-highlighting/file.c b/tests/syntax-highlighting/file.c
new file mode 100644
index 0000000..ed0bb82
--- /dev/null
+++ b/tests/syntax-highlighting/file.c
@@ -0,0 +1,13 @@
+// Comment
+
+#include <stdio.h>
+
+int main (void)
+{
+    int a = 0x89;
+    int b = 089;
+    int c = 89.;
+    int d = 'a';
+    printf ("Hello %s!\n", "world");
+    return 0;
+}
diff --git a/tests/syntax-highlighting/file.cc b/tests/syntax-highlighting/file.cc
new file mode 100644
index 0000000..8b8d46c
--- /dev/null
+++ b/tests/syntax-highlighting/file.cc
@@ -0,0 +1,8 @@
+#include <iostream>
+
+class A : B {
+public:
+    A();
+private:
+    foobar() const;
+};
diff --git a/tests/syntax-highlighting/file.cg b/tests/syntax-highlighting/file.cg
new file mode 100644
index 0000000..28b352f
--- /dev/null
+++ b/tests/syntax-highlighting/file.cg
@@ -0,0 +1,17 @@
+struct OurOutputType
+{
+       float4 position : POSITION;
+       float4 color : COLOR;
+};
+
+OurOutputType
+main(float4           position : POSITION,
+     uniform float4x4 modelViewProj)
+{
+       OurOutputType OUT;
+
+       OUT.position = mul(modelViewProj, position);
+       OUT.color = position;
+
+       return OUT;
+}
diff --git a/tests/syntax-highlighting/file.cob b/tests/syntax-highlighting/file.cob
new file mode 100644
index 0000000..dbf5b9e
--- /dev/null
+++ b/tests/syntax-highlighting/file.cob
@@ -0,0 +1,25 @@
+       IDENTIFICATION DIVISION.
+       PROGRAM-ID. Age.
+       AUTHOR. Fernando Brito.
+
+       DATA DIVISION.
+       WORKING-STORAGE SECTION.
+       01  Age               PIC 99   VALUE ZEROS.
+       01  Had_Birthday      PIC X    VALUE SPACES.
+       01  Current_Year      PIC 9999 VALUE 2010.
+       01  Result            PIC 9999 VALUE ZEROS.
+
+       PROCEDURE DIVISION.
+          DISPLAY "==> How old are you?".
+          ACCEPT Age
+          DISPLAY "==> Had you already had birthday this year (y or n)?".
+          ACCEPT Had_Birthday
+
+          SUBTRACT Current_Year FROM Age GIVING Result
+
+          IF Had_Birthday = "n" THEN
+            SUBTRACT 1 FROM Result GIVING Result
+          END-IF
+
+          DISPLAY "Let me guess... "" You were born in ", Result
+          STOP RUN.
diff --git a/tests/syntax-highlighting/file.cu b/tests/syntax-highlighting/file.cu
new file mode 100644
index 0000000..dfe341a
--- /dev/null
+++ b/tests/syntax-highlighting/file.cu
@@ -0,0 +1,14 @@
+#include "cuMatrix.h"
+
+__global__ void make_BlackWhite(int *image, int N){
+       unsigned int x = blockIdx.x * blockDim.x + threadIdx.x;
+       unsigned int y = blockIdx.y * blockDim.y + threadIdx.y;
+
+       image[y*N + x] = image[y*N + x] > 128 ? 255 : 0;
+}
+
+void convertToArray(int **matrix, int *array, int N){
+       for(unsigned int i=0; i< N; i++)
+               for(unsigned int j=0; j< N; j++)
+                       array[i*N+ j] = matrix[i][j];
+}
diff --git a/tests/syntax-highlighting/file.desktop b/tests/syntax-highlighting/file.desktop
new file mode 100644
index 0000000..b0ddf40
--- /dev/null
+++ b/tests/syntax-highlighting/file.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+_Name=medit
+_Comment=Text editor
+Exec=medit %F
+# blah blah blah
+Terminal=false
+Type=Application
+StartupNotify=true
+MimeType=text/plain;
+Icon=medit.png
+Categories=Application;Utility;TextEditor;
diff --git a/tests/syntax-highlighting/file.diff b/tests/syntax-highlighting/file.diff
new file mode 100644
index 0000000..c408bf3
--- /dev/null
+++ b/tests/syntax-highlighting/file.diff
@@ -0,0 +1,12 @@
+diff -r 231ed68760a0 moo/moofileview/moofileview.c
+--- a/moo/moofileview/moofileview.c     Wed Dec 20 21:08:14 2006 -0600
++++ b/moo/moofileview/moofileview.c     Wed Dec 20 20:33:06 2006 -0600
+@@ -1407,7 +1413,7 @@ create_toolbar (MooFileView *fileview)
+
+     gtk_toolbar_set_tooltips (toolbar, TRUE);
+     gtk_toolbar_set_style (toolbar, GTK_TOOLBAR_ICONS);
+-    gtk_toolbar_set_icon_size (toolbar, GTK_ICON_SIZE_MENU);
++    gtk_toolbar_set_icon_size (toolbar, TOOLBAR_ICON_SIZE);
+
+     _moo_file_view_setup_button_drag_dest (fileview, "MooFileView/Toolbar/GoUp", "go-up");
+     _moo_file_view_setup_button_drag_dest (fileview, "MooFileView/Toolbar/GoBack", "go-back");
diff --git a/tests/syntax-highlighting/file.dtd b/tests/syntax-highlighting/file.dtd
new file mode 100644
index 0000000..10aedbe
--- /dev/null
+++ b/tests/syntax-highlighting/file.dtd
@@ -0,0 +1,15 @@
+<!-- FIXME: the "name" attribute can be "_name" to be marked for translation -->
+<!ENTITY % itemattrs
+ "name  CDATA #REQUIRED
+  style CDATA #REQUIRED">
+<!ELEMENT language (escape-char?,(line-comment|block-comment|string|syntax-item|pattern-item|keyword-list)+)>
+<!-- FIXME: the "name" and "section" attributes can be prefixed with
+     "_" to be marked for translation -->
+<!ELEMENT keyword-list (keyword+)>
+<!ATTLIST keyword-list
+  %itemattrs;
+  case-sensitive                  (true|false) "true"
+  match-empty-string-at-beginning (true|false) "false"
+  match-empty-string-at-end       (true|false) "false"
+  beginning-regex                 CDATA        #IMPLIED
+  end-regex                       CDATA        #IMPLIED>
diff --git a/tests/syntax-highlighting/file.f b/tests/syntax-highlighting/file.f
new file mode 100644
index 0000000..2b12acf
--- /dev/null
+++ b/tests/syntax-highlighting/file.f
@@ -0,0 +1,25 @@
+! gtk-source-lang: fortran
+program test95
+  ! Comment: This is a Fortran free-form program
+!$ use omp_lib
+  ! The previous line is not a comment, but an OpenMP directive
+  implicit none
+  character(len=9),parameter  :: t='Some text'
+  integer,parameter           :: a=1
+  real,parameter              :: r1=1.23e0, r2=.12, r3=12., r4=12.12, r5=1.d0
+!$  real*8                    :: t1, t2
+  integer                     :: i
+
+!$ t1 = omp_get_wtime()
+  if ( .true. ) then
+    print *, a, t
+    print *,size( (/ r1, r2, r3, r4, r5 /) )
+  endif
+  ! parallel do
+  do i=1,100
+    print *,i
+  enddo ! i
+  ! end parallel do
+!$ t2 = omp_get_wtime()
+!$ print *,'The loop took ',t2-t1,'seconds'
+end program
diff --git a/tests/syntax-highlighting/file.fcl b/tests/syntax-highlighting/file.fcl
new file mode 100644
index 0000000..ddb5b68
--- /dev/null
+++ b/tests/syntax-highlighting/file.fcl
@@ -0,0 +1,12 @@
+FUNCTION_BLOCK explore
+
+VAR_INPUT
+    front : REAL;
+    left : REAL;
+    right : REAL;
+END_VAR
+
+VAR_OUTPUT
+    velocity : REAL;
+    angular_velocity : REAL;
+END_VAR
diff --git a/tests/syntax-highlighting/file.frt b/tests/syntax-highlighting/file.frt
new file mode 100644
index 0000000..067d28e
--- /dev/null
+++ b/tests/syntax-highlighting/file.frt
@@ -0,0 +1,8 @@
+\ gtk-source-lang: forth
+-- comment
+(* comment!
+  here still comment
+*)
+NEEDS something
+IF 0 THEN ENDIF
+Numbers: 1234 33 #345325 %01000
diff --git a/tests/syntax-highlighting/file.fs b/tests/syntax-highlighting/file.fs
new file mode 100644
index 0000000..e975961
--- /dev/null
+++ b/tests/syntax-highlighting/file.fs
@@ -0,0 +1,8 @@
+(* Simple F# sample *)
+let rec map func lst =
+    match lst with
+       | [] -> []
+       | head :: tail -> func head :: map func tail
+ 
+let myList = [1;3;5]
+let newList = map (fun x -> x + 1) myList
diff --git a/tests/syntax-highlighting/file.g b/tests/syntax-highlighting/file.g
new file mode 100644
index 0000000..8ce85b1
--- /dev/null
+++ b/tests/syntax-highlighting/file.g
@@ -0,0 +1,3 @@
+for i in [1..10] do
+  Print("blah blah blah\n");
+od;
diff --git a/tests/syntax-highlighting/file.glslf b/tests/syntax-highlighting/file.glslf
new file mode 100644
index 0000000..a0b732d
--- /dev/null
+++ b/tests/syntax-highlighting/file.glslf
@@ -0,0 +1,11 @@
+#version 140
+varying vec4 color_out;
+/*
+  A color shader
+*/
+void main(void)
+{
+  // edit the color of the fragment
+  vec4 new_color = color_out + vec4(0.4, 0.4, 0.1, 1.0);
+  gl_FragColor = clamp(new_color, 0.0, 1.0);
+}
diff --git a/tests/syntax-highlighting/file.go b/tests/syntax-highlighting/file.go
new file mode 100644
index 0000000..1d17dce
--- /dev/null
+++ b/tests/syntax-highlighting/file.go
@@ -0,0 +1,8 @@
+// gtk-source-lang: Go
+/* comment! */
+var s string := "A string\n"
+import ("fmt")
+func main() { fmt.Printf(s); }
+type my_struct struct { I int; o string }
+package foo
+bar( a int32, b string )(c float32 ){ c = 1.3 + float32(a - int32(len(b)) }
diff --git a/tests/syntax-highlighting/file.h b/tests/syntax-highlighting/file.h
new file mode 100644
index 0000000..9389573
--- /dev/null
+++ b/tests/syntax-highlighting/file.h
@@ -0,0 +1,11 @@
+/* A C header damn it */
+#include <foo.h>
+#import <Object.h>
+
+ interface Lalala : Object
+- (void) sayHello;
+ end
+
+class Boo {
+  void hello ();
+};
diff --git a/tests/syntax-highlighting/file.html b/tests/syntax-highlighting/file.html
new file mode 100644
index 0000000..5a6d10f
--- /dev/null
+++ b/tests/syntax-highlighting/file.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd";>
+<!-- Comment -->
+<html>
+  <head>
+    <title>Hi there!</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+    <style type="text/css">
+      a.summary-letter {text-decoration: none}
+      pre.display {font-family: serif}
+      pre.format {font-family: serif}
+    </style>
+  </head>
+  <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF"
+        vlink="#800080" alink="#FF0000">
+    Hi there!
+  </body>
+</html>
diff --git a/tests/syntax-highlighting/file.ijm b/tests/syntax-highlighting/file.ijm
new file mode 100644
index 0000000..120b3d0
--- /dev/null
+++ b/tests/syntax-highlighting/file.ijm
@@ -0,0 +1,11 @@
+// line comment
+var variable = "string\n with \t escaped\"characters";
+macro "new macro" {
+  NotGlobalVar = 5 +6;
+  result = getPixel(0, 0);
+  run("8-bit");
+}
+function NewFunction() {
+  /*
+  multiline comment*/
+}
diff --git a/tests/syntax-highlighting/file.impl b/tests/syntax-highlighting/file.impl
new file mode 100644
index 0000000..088b8f5
--- /dev/null
+++ b/tests/syntax-highlighting/file.impl
@@ -0,0 +1,11 @@
+-- Opal test
+IMPLEMENTATION LeapYear
+
+IMPORT Nat COMPLETELY
+
+DEF leapYear(year) ==
+  IF (year % ("400"!) = 0) THEN true
+  IF (year % ("400"!) |= 0) and (year % 100 = 0) THEN false
+  IF (year % 100 |= 0) and (year % 4 = 0) THEN true
+  IF (year % 4 |= 0) THEN false
+  FI
diff --git a/tests/syntax-highlighting/file.ini b/tests/syntax-highlighting/file.ini
new file mode 100644
index 0000000..668265e
--- /dev/null
+++ b/tests/syntax-highlighting/file.ini
@@ -0,0 +1,11 @@
+[module]
+type=Python
+file=simple.py
+version=1.0
+[plugin]
+id=APlugin
+_name=A Plugin
+_description=A plugin
+author=Some Guy
+; this is a plugin version, can be anything
+version=3.1415926
diff --git a/tests/syntax-highlighting/file.json b/tests/syntax-highlighting/file.json
new file mode 100644
index 0000000..3707e73
--- /dev/null
+++ b/tests/syntax-highlighting/file.json
@@ -0,0 +1,12 @@
+{
+       "hi": -1.1e1, "b": 2,
+       "abc": "hi",
+       "dce": [
+               1.2, 2e10, -3,
+               1, 2,
+               "string"
+       ],
+       "fgh": {
+               "a": 1
+       }
+}
diff --git a/tests/syntax-highlighting/file.la b/tests/syntax-highlighting/file.la
new file mode 100644
index 0000000..db76e5b
--- /dev/null
+++ b/tests/syntax-highlighting/file.la
@@ -0,0 +1,36 @@
+# moo.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.22 Debian 1.5.22-4 (1.1220.2.365 2005/12/18 22:14:06)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='moo.so'
+
+# Names of this library.
+library_names='moo.so moo.so moo.so'
+
+# The name of the static archive.
+old_library=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -L/usr/local/gtk/lib /home/muntyan/projects/gtk/build/moo/moo/libmoo.la -lutil 
/usr/local/gtk/lib/libgtk-x11-2.0.la -lXext -lXinerama -lXrandr -lXcursor -lXfixes 
/usr/local/gtk/lib/libgdk-x11-2.0.la -latk-1.0 /usr/local/gtk/lib/libgdk_pixbuf-2.0.la 
/usr/local/gtk/lib/libpangocairo-1.0.la /usr/local/gtk/lib/libpangoft2-1.0.la 
/usr/local/gtk/lib/libpango-1.0.la /usr/local/gtk/lib/libcairo.la -lfreetype -lz -lfontconfig -lpng12 
-lXrender -lX11 -lm /usr/local/gtk/lib/libgobject-2.0.la /usr/local/gtk/lib/libgmodule-2.0.la -ldl 
/usr/local/gtk/lib/libgthread-2.0.la -lpthread /usr/local/gtk/lib/libglib-2.0.la -lrt -lpcre 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../..//libfam.la -lrpcsvc 
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../..//libxml2.la -L/usr/lib/python2.4 -lpython2.4  '
+
+# Version information for moo.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/gtk/lib/python2.4/site-packages'
+relink_command="(cd /home/muntyan/projects/gtk/build/moo/moo; /bin/sh ../libtool  --tag=CC --mode=relink gcc 
-g -L/usr/local/gtk/lib -o moo.la -rpath /usr/local/gtk/lib/python2.4/site-packages -no-undefined -module 
-avoid-version -export-symbols-regex initmoo moopython/libmoomod.la libmoo.la -lutil -L/usr/local/gtk/lib 
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 
-lgmodule-2.0 -ldl -lglib-2.0 -pthread -L/usr/local/gtk/lib -lgthread-2.0 -lglib-2.0 -lpcre -lfam -lxml2 
-L/usr/lib/python2.4 -lpython2.4 @inst_prefix_dir@)"
diff --git a/tests/syntax-highlighting/file.ll b/tests/syntax-highlighting/file.ll
new file mode 100644
index 0000000..8f4e570
--- /dev/null
+++ b/tests/syntax-highlighting/file.ll
@@ -0,0 +1,18 @@
+; LLVM intermediate representation
+; Run with: llc file.ll && gcc file.s && ./a.out
+
+ str = internal constant [4 x i8] c"%d\0A\00"
+
+declare i32 @printf(i8*, ...)
+
+define i32 @main() {
+  ; Print a secret number on the screen
+  %1 = select i1 true, float 0x402ABD70A0000000, float 0xC0FFEE0000000000
+  %2 = fpext float %1 to double
+  %3 = fmul double %2, 1.000000e+02
+  %4 = fptoui double %3 to i32
+  %5 = add i32 %4, 1
+  ; Call printf
+  call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @str, i32 0, i32 0), i32 %5)
+  ret i32 0
+}
diff --git a/tests/syntax-highlighting/file.m b/tests/syntax-highlighting/file.m
new file mode 100644
index 0000000..66785aa
--- /dev/null
+++ b/tests/syntax-highlighting/file.m
@@ -0,0 +1,21 @@
+#import <stdio.h>
+#import <Object.h>
+ 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;
+}
diff --git a/tests/syntax-highlighting/file.m4 b/tests/syntax-highlighting/file.m4
new file mode 100644
index 0000000..7b932ab
--- /dev/null
+++ b/tests/syntax-highlighting/file.m4
@@ -0,0 +1,4 @@
+dnl an m4 file
+AC_DEFINE([foo],[echo "Hi there!"])
+AC_CHECK_FUNC([foo],[yes=yes],[yes=no])
+foo()
diff --git a/tests/syntax-highlighting/file.octave b/tests/syntax-highlighting/file.octave
new file mode 100644
index 0000000..a1d887a
--- /dev/null
+++ b/tests/syntax-highlighting/file.octave
@@ -0,0 +1,3 @@
+% gtk-source-lang: octave
+% -*- octave -*-
+No idea what syntax is
diff --git a/tests/syntax-highlighting/file.ooc b/tests/syntax-highlighting/file.ooc
new file mode 100644
index 0000000..66992c4
--- /dev/null
+++ b/tests/syntax-highlighting/file.ooc
@@ -0,0 +1,10 @@
+import structs/[ArrayList, LinkedList], io/FileReader
+include stdarg, memory, string
+use sdl, gtk
+pi := const 3.14
+Int: cover from int {
+    toString: func -> String { "%d" format() }
+}
+Dog: class extends Animal {
+    barf: func { ("woof! " * 2) println() }
+}
diff --git a/tests/syntax-highlighting/file.pc b/tests/syntax-highlighting/file.pc
new file mode 100644
index 0000000..a914078
--- /dev/null
+++ b/tests/syntax-highlighting/file.pc
@@ -0,0 +1,14 @@
+# A comment
+prefix=/usr
+exec_prefix=
+libdir=/lib
+includedir=/include
+
+Name: cairo
+Description: Multi-platform 2D graphics library
+Version: 1.4.10
+
+Requires.private: freetype2 >= 8.0.2 fontconfig libpng12 xrender >= 0.6 x11
+Libs: -L -lcairo
+Libs.private: -lz -lm
+Cflags: -I/cairo
diff --git a/tests/syntax-highlighting/file.pl b/tests/syntax-highlighting/file.pl
new file mode 100644
index 0000000..580fe18
--- /dev/null
+++ b/tests/syntax-highlighting/file.pl
@@ -0,0 +1,110 @@
+#!/usr/bin/perl -- # -*- Perl -*-
+#
+# : collateindex.pl,v 1.10 2004/10/24 17:05:41 petere78 Exp $
+
+print OUT "<title></title>\n\n" if ;
+
+ = {};     # the last indexterm we processed
+ = 1;     # this is the first one
+ = "";    # we're not in a group yet
+ = "";  # we've not put anything out yet
+ seealsos = (); # See also stack.
+
+# Termcount is > 0 iff some entries were skipped.
+ || print STDERR " entries ignored...\n";
+
+&end_entry();
+
+print OUT "</indexdiv>\n" if ;
+print OUT "</>\n";
+
+close (OUT);
+
+ || print STDERR "Done.\n";
+
+sub same {
+    my() = shift;
+    my() = shift;
+
+    my() = ->{'psortas'} || ->{'primary'};
+    my() = ->{'ssortas'} || ->{'secondary'};
+    my() = ->{'tsortas'} || ->{'tertiary'};
+
+    my() = ->{'psortas'} || ->{'primary'};
+    my() = ->{'ssortas'} || ->{'secondary'};
+    my() = ->{'tsortas'} || ->{'tertiary'};
+
+    my();
+
+     =~ s/^\s*//;  =~ s/\s*$//;  = uc();
+     =~ s/^\s*//;  =~ s/\s*$//;  = uc();
+     =~ s/^\s*//;  =~ s/\s*$//;  = uc();
+     =~ s/^\s*//;  =~ s/\s*$//;  = uc();
+     =~ s/^\s*//;  =~ s/\s*$//;  = uc();
+     =~ s/^\s*//;  =~ s/\s*$//;  = uc();
+
+#    print "[]=[]\n";
+#    print "[]=[]\n";
+#    print "[]=[]\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  is true.
+
+     = (( eq )
+            && ( eq )
+            && ( eq )
+            && (->{'title'} eq ->{'title'})
+            && (->{'href'} eq ->{'href'}));
+
+    # If we're linking to points, they're only the same if they link
+    # to exactly the same spot.
+     =  && (->{'hrefpoint'} eq ->{'hrefpoint'})
+       if ;
+
+    if () {
+       warn ": duplicated index entry found:   \n";
+    }
+
+    ;
+}
+
+sub tsame {
+    # Unlike same(), tsame only compares a single term
+    my() = shift;
+    my() = shift;
+    my() = shift;
+    my() = substr(, 0, 1) . "sortas";
+    my(, );
+
+     = ->{} || ->{};
+     = ->{} || ->{};
+
+     =~ s/^\s*//;  =~ s/\s*$//;  = uc();
+     =~ s/^\s*//;  =~ s/\s*$//;  = uc();
+
+    return  eq ;
+}
+
+=head1 EXAMPLE
+B<collateindex.pl> B<-o> F<index.sgml> F<HTML.index>
+=head1 EXIT STATUS
+=over 5
+=item B<0>
+Success
+=item B<1>
+Failure
+=back
+=head1 AUTHOR
+Norm Walsh E<lt>ndw nwalsh comE<gt>
+Minor updates by Adam Di Carlo E<lt>adam onshore comE<gt> and Peter Eisentraut E<lt>peter_e gmx netE<gt>
+=cut
diff --git a/tests/syntax-highlighting/file.po b/tests/syntax-highlighting/file.po
new file mode 100644
index 0000000..ddcaacb
--- /dev/null
+++ b/tests/syntax-highlighting/file.po
@@ -0,0 +1,24 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL ADDRESS>, 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 <EMAIL ADDRESS>\n"
+"Language-Team: LANGUAGE <LL li org>\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 ""
diff --git a/tests/syntax-highlighting/file.prg b/tests/syntax-highlighting/file.prg
new file mode 100644
index 0000000..72e4824
--- /dev/null
+++ b/tests/syntax-highlighting/file.prg
@@ -0,0 +1,28 @@
+import "mod_say"
+import "mod_rand"
+import "mod_screen"
+import "mod_video"
+import "mod_map"
+import "mod_key"
+
+// Bouncing box example
+process main()
+private
+  int vx=5, vy=5;
+
+begin
+  set_mode(640, 480, 16, MODE_WINDOW);
+  graph = map_new(20, 20, 16);
+  map_clear(0, graph, rgb(255, 0, 0));
+  x = 320; y = 240;
+  while(! key(_esc))
+    if(x > 630 || x < 10)
+      vx = -vx;
+    end;
+    if(y > 470 || y < 10)
+      vy = -vy;
+    end;
+    x += vx; y += vy; // Move the box
+    frame;
+  end;
+end;
diff --git a/tests/syntax-highlighting/file.prolog b/tests/syntax-highlighting/file.prolog
new file mode 100644
index 0000000..557911f
--- /dev/null
+++ b/tests/syntax-highlighting/file.prolog
@@ -0,0 +1,3 @@
+conc([],X,X).
+conc([Car|Cdr], X, [Car|ConcatCdr]):-
+  conc(Cdr, X, ConcatCdr).
diff --git a/tests/syntax-highlighting/file.py b/tests/syntax-highlighting/file.py
new file mode 100644
index 0000000..faaa113
--- /dev/null
+++ b/tests/syntax-highlighting/file.py
@@ -0,0 +1,9 @@
+import sys
+from sys import *
+class Hello(object):
+    def __init__(self):
+        object.__init__(self)
+    def hello(self):
+        print >> sys.stderr, "Hi there!"
+    None, True, False
+Hello().hello()
diff --git a/tests/syntax-highlighting/file.rq b/tests/syntax-highlighting/file.rq
new file mode 100644
index 0000000..8be12e4
--- /dev/null
+++ b/tests/syntax-highlighting/file.rq
@@ -0,0 +1,9 @@
+# Positive test: product of type promotion within the xsd:decimal type tree.
+
+PREFIX t: <http://www.w3.org/2001/sw/DataAccess/tests/data/TypePromotion/tP-0#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+ASK
+ WHERE { t:double1 rdf:value ?l .
+         t:float1 rdf:value ?r .
+         FILTER ( datatype(?l + ?r) = xsd:double ) }
diff --git a/tests/syntax-highlighting/file.sci b/tests/syntax-highlighting/file.sci
new file mode 100644
index 0000000..f93cd77
--- /dev/null
+++ b/tests/syntax-highlighting/file.sci
@@ -0,0 +1,14 @@
+// A comment with whites and tabulations               
+// Scilab editor: http://www.scilab.org/
+
+function [a, b] = myfunction(d, e, f)
+       a = 2.71828 + %pi + f($, :);
+       b = cos(a) + cosh(a);
+       if d == e then
+               b = 10 - e.field;
+       else
+               b = "           test     " + home
+               return
+       end
+       myvar = 1.23e-45;
+endfunction
diff --git a/tests/syntax-highlighting/file.sh b/tests/syntax-highlighting/file.sh
new file mode 100644
index 0000000..92b60f0
--- /dev/null
+++ b/tests/syntax-highlighting/file.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo "Hi there!"
diff --git a/tests/syntax-highlighting/file.spec b/tests/syntax-highlighting/file.spec
new file mode 100644
index 0000000..0ee74c6
--- /dev/null
+++ b/tests/syntax-highlighting/file.spec
@@ -0,0 +1,105 @@
+#
+# gtksourceview.spec
+#
+
+%define api_version    1.0
+%define lib_major 0
+%define lib_name       %mklibname %{name}- %{api_version} %{lib_major}
+
+Summary:       Source code viewing library
+Name:          gtksourceview
+Version:       1.7.2
+Release:       %mkrel 1
+License:       GPL
+Group:         Editors
+URL:           http://people.ecsc.co.uk/~matt/downloads/rpms/gtksourceview/
+Source0:       ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/%{name}-%{version}.tar.bz2
+BuildRoot:     %{_tmppath}/%{name}-%{version}
+BuildRequires: libgtk+2-devel >= 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 <waschk mandriva org> 1.7.2-1mdv2007.0
+- New release 1.7.2
+
+* Tue Jul 25 2006 Götz Waschk <waschk mandriva org> 1.7.1-1mdk
+- New release 1.7.1
diff --git a/tests/syntax-highlighting/file.svh b/tests/syntax-highlighting/file.svh
new file mode 100644
index 0000000..84f48fe
--- /dev/null
+++ b/tests/syntax-highlighting/file.svh
@@ -0,0 +1,46 @@
+class my_class extends some_class;
+
+  // This is a comment.
+  /* This is also a comment, but it containts keywords: bit string, etc */
+
+  // Some types.
+  string         my_string = "This is a string";
+  bit [3:0]        my_bits = 4'b0z1x;
+  integer       my_integer = 32'h0z2ab43x;
+  real             my_real = 1.2124155e-123;
+  shortreal   my_shortreal = -0.1111e1;
+  int               my_int = 53152462;
+ 
+  extern function bit
+    my_function(
+      int unsigned       something);
+
+endclass : my_class
+
+function bit
+  my_class::my_function(
+    int unsigned    something);
+
+  /* Display a string.
+   *
+   *   This is a slightly awkward string as it has
+   *   special characters and line continuations.
+   */
+  ("Display a string that continues over             multiple lines and contains special             
characters: \n \t \" \'");
+
+  // Use a system task.
+  my_int = (my_bits);
+
+  // ();     // Commenting a system task.
+  // my_function();   // Commenting a function.
+
+endfunction my_function
+
+program test();
+
+  my_class c;
+
+  c = new();
+  c.my_function(3);
+
+endprogram : test
diff --git a/tests/syntax-highlighting/file.t2t b/tests/syntax-highlighting/file.t2t
new file mode 100644
index 0000000..fa290ae
--- /dev/null
+++ b/tests/syntax-highlighting/file.t2t
@@ -0,0 +1,8 @@
+! gtk-source-lang: t2t
+
+%!include ``something``
+% Comment
+``verbatim`` //italic//
+```
+verbatim block
+```
diff --git a/tests/syntax-highlighting/file.testv1 b/tests/syntax-highlighting/file.testv1
new file mode 100644
index 0000000..3636ac1
--- /dev/null
+++ b/tests/syntax-highlighting/file.testv1
@@ -0,0 +1,9 @@
+// gtk-source-lang: testv1
+// comment
+/* comment! */
+"A string"
+'And a string too'
+bambom - keyword, Others
+bumbam - keyword, Others2
+kwkw - keyword, Keyword
+Numbers: 0.1 1234 0233
diff --git a/tests/syntax-highlighting/file.tex b/tests/syntax-highlighting/file.tex
new file mode 100644
index 0000000..46bffee
--- /dev/null
+++ b/tests/syntax-highlighting/file.tex
@@ -0,0 +1,4 @@
+\documentclass{article}
+\begin{document}
+Hi there!
+\end{document}
diff --git a/tests/syntax-highlighting/file.texi b/tests/syntax-highlighting/file.texi
new file mode 100644
index 0000000..f056eeb
--- /dev/null
+++ b/tests/syntax-highlighting/file.texi
@@ -0,0 +1,51 @@
+\input texinfo
+ setfilename manual
+ settitle manual
+
+ titlepage
+ title manual
+
+ c The following two commands start the copyright page.
+ page
+ vskip 0pt plus 1filll
+ insertcopying
+ end titlepage
+
+ c Output the table of contents at the beginning.
+ contents
+
+ ifnottex
+ node Top
+ top manual
+ insertcopying
+ end ifnottex
+
+ menu
+* MooScript::    MooScript - builtin scripting language.
+* Index::        Index.
+ end menu
+
+ node MooScript
+ chapter MooScript
+
+ cindex chapter, first
+
+This is the first chapter.
+ cindex index entry, another
+
+Here is a numbered list.
+
+ enumerate
+ item
+This is the first item.
+
+ item
+This is the second item.
+ end enumerate
+
+ node Index
+ unnumbered Index
+
+ printindex cp
+
+ bye
diff --git a/tests/syntax-highlighting/file.xml b/tests/syntax-highlighting/file.xml
new file mode 100644
index 0000000..e6b4d46
--- /dev/null
+++ b/tests/syntax-highlighting/file.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<foolala version='8.987'>
+  <bar>momomomo</bar><baz a="b"/>
+</foolala>
diff --git a/tests/syntax-highlighting/file.y b/tests/syntax-highlighting/file.y
new file mode 100644
index 0000000..66a7853
--- /dev/null
+++ b/tests/syntax-highlighting/file.y
@@ -0,0 +1,58 @@
+%{
+#include <stdio.h>
+#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 <str> ATOKEN
+%token <str> ATOKEN2
+
+%type <ival> program stmt
+%type <str> 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 ';'          { $$ = ; }
+;
+
+variable: IDENTIFIER                        { $$ = node_var (parser, $1); }
+;
+
+%%
diff --git a/tests/syntax-highlighting/gtkrc b/tests/syntax-highlighting/gtkrc
new file mode 100644
index 0000000..417ef55
--- /dev/null
+++ b/tests/syntax-highlighting/gtkrc
@@ -0,0 +1,9 @@
+# -- THEME AUTO-WRITTEN DO NOT EDIT
+include "/usr/share/themes/Clearlooks/gtk-2.0/gtkrc"
+style "user-font"
+{
+  font_name="Tahoma 11"
+}
+widget_class "*" style "user-font"
+include "/home/muntyan/.gtkrc-2.0.mine"
+# -- THEME AUTO-WRITTEN DO NOT EDIT



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