vala-tests r15 - trunk/tests/bugs



Author: malureau
Date: Sat Oct 18 00:38:08 2008
New Revision: 15
URL: http://svn.gnome.org/viewvc/vala-tests?rev=15&view=rev

Log:
Add bug 433290

Added:
   trunk/tests/bugs/433290.test
      - copied, changed from r14, /trunk/tests/bugs/428368.test
   trunk/tests/bugs/433290.vala
Modified:
   trunk/tests/bugs/428368.test
   trunk/tests/bugs/433288.test
   trunk/tests/bugs/update.sh

Modified: trunk/tests/bugs/428368.test
==============================================================================
--- trunk/tests/bugs/428368.test	(original)
+++ trunk/tests/bugs/428368.test	Sat Oct 18 00:38:08 2008
@@ -21,10 +21,13 @@
 
 $VALAC  --pkg gtk+-2.0 -o $TESTNAME $SRCDIR/$TESTNAME.vala  $VALAFLAGS
 
+ || exit 1
+
 if [ "x1" = "x1" -o "x$INTERACT" = "x1" ] ; then
   G_DEBUG=fatal_warnings ./$TESTNAME  $@
 else
   echo ""
-  echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+  [ "x1" = "x0" ] && echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+  [ "x1" = "xno" ] && rm -rf 428368.o
 fi
 

Modified: trunk/tests/bugs/433288.test
==============================================================================
--- trunk/tests/bugs/433288.test	(original)
+++ trunk/tests/bugs/433288.test	Sat Oct 18 00:38:08 2008
@@ -21,10 +21,13 @@
 
 $VALAC  -o $TESTNAME $SRCDIR/$TESTNAME.vala  $VALAFLAGS
 
+ || exit 1
+
 if [ "x1" = "x1" -o "x$INTERACT" = "x1" ] ; then
   G_DEBUG=fatal_warnings ./$TESTNAME  $@
 else
   echo ""
-  echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+  [ "x1" = "x0" ] && echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+  [ "x1" = "xno" ] && rm -rf 433288.o
 fi
 

Copied: trunk/tests/bugs/433290.test (from r14, /trunk/tests/bugs/428368.test)
==============================================================================
--- /trunk/tests/bugs/428368.test	(original)
+++ trunk/tests/bugs/433290.test	Sat Oct 18 00:38:08 2008
@@ -19,12 +19,15 @@
 
 TESTNAME=`basename $0 .test`
 
-$VALAC  --pkg gtk+-2.0 -o $TESTNAME $SRCDIR/$TESTNAME.vala  $VALAFLAGS
+$VALAC  -o $TESTNAME $SRCDIR/$TESTNAME.vala  -c -C $VALAFLAGS
 
-if [ "x1" = "x1" -o "x$INTERACT" = "x1" ] ; then
+! grep -i my 433290.h || exit 1
+
+if [ "xno" = "x1" -o "x$INTERACT" = "x1" ] ; then
   G_DEBUG=fatal_warnings ./$TESTNAME  $@
 else
   echo ""
-  echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+  [ "xno" = "x0" ] && echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+  [ "xno" = "xno" ] && rm -rf 433290.o
 fi
 

Added: trunk/tests/bugs/433290.vala
==============================================================================
--- (empty file)
+++ trunk/tests/bugs/433290.vala	Sat Oct 18 00:38:08 2008
@@ -0,0 +1,5 @@
+delegate void My.Callback (uint j, void *data);
+
+class My.Class {
+	public void apply(Callback cb, void *user_data) { }
+}

Modified: trunk/tests/bugs/update.sh
==============================================================================
--- trunk/tests/bugs/update.sh	(original)
+++ trunk/tests/bugs/update.sh	Sat Oct 18 00:38:08 2008
@@ -6,6 +6,10 @@
 deprecated="
 "
 
+norun="
+433290
+"
+
 set -e
 
 while true ; do
@@ -19,6 +23,7 @@
 
 for file in *.vala ; do
 
+VALAFLAGS=
 test=`basename $file .vala`
 
 # hackish
@@ -45,6 +50,12 @@
 for nr in $interactive ; do
   [ $nr = $test ] && RUN=0
 done
+for nr in $norun ; do
+  [ $nr = $test ] && RUN=no VALAFLAGS="$VALAFLAGS -c"
+done
+
+TESTEXPECT=
+[ "$test" = "433290" ] && TESTEXPECT="! grep -i my 433290.h" VALAFLAGS="$VALAFLAGS -C"
 
 cat >$test.test <<EOF
 #!/bin/sh
@@ -70,11 +81,14 @@
 
 \$VALAC $PACKAGES -o \$TESTNAME \$SRCDIR/\$TESTNAME.vala $VALAFLAGS \$VALAFLAGS
 
+$TESTEXPECT || exit 1
+
 if [ "x$RUN" = "x1" -o "x\$INTERACT" = "x1" ] ; then
   G_DEBUG=fatal_warnings ./\$TESTNAME $TESTARGS \$@
 else
   echo ""
-  echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+  [ "x$RUN" = "x0" ] && echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+  [ "x$RUN" = "xno" ] && rm -rf $test.o
 fi
 
 EOF
@@ -83,6 +97,6 @@
 
 [ "$check" = "1" ] && echo "Running $test..." && ./$test.test $interact $@
 
-rm -f $test $test.c $test.h
+rm -f $test $test.{c,h,o}
 
 done
\ No newline at end of file



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