gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog extensions/lirc/test.as


From: Rob Savoye
Subject: [Gnash-commit] gnash ChangeLog extensions/lirc/test.as
Date: Sat, 15 Sep 2007 16:42:56 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Rob Savoye <rsavoye>    07/09/15 16:42:56

Modified files:
        .              : ChangeLog 
Added files:
        extensions/lirc: test.as 

Log message:
                * extensions/lirc/test.as: Test case for Lirc extension.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/lirc/test.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4323&r2=1.4324

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4323
retrieving revision 1.4324
diff -u -b -r1.4323 -r1.4324
--- ChangeLog   15 Sep 2007 03:06:37 -0000      1.4323
+++ ChangeLog   15 Sep 2007 16:42:55 -0000      1.4324
@@ -1,3 +1,7 @@
+2007-09-15  Rob Savoye  <address@hidden>
+
+       * extensions/lirc/test.as: Test case for Lirc extension.
+
 2007-09-14  Rob Savoye  <address@hidden>
 
        * extensions/lirc/Makefile.am: Chnage from lirc.* to lirc_ext.* to

Index: extensions/lirc/test.as
===================================================================
RCS file: extensions/lirc/test.as
diff -N extensions/lirc/test.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ extensions/lirc/test.as     15 Sep 2007 16:42:55 -0000      1.1
@@ -0,0 +1,58 @@
+// 
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+// Test case for lirc ActionScript class
+// compile this test case with Ming makeswf, and then
+// execute it like this gnash -1 -r 0 -v out.swf
+
+rcsid="$Id: test.as,v 1.1 2007/09/15 16:42:55 rsavoye Exp $";
+
+var remote = new Lirc();
+
+// test the constuctor
+if (remote) {
+    trace("Lirc() constructor works");
+} else {
+    trace("Lirc() constructor failed");
+}
+
+if (!remote) {
+    trace("UNTESTED: extensions not built!");
+}
+
+// var keyObj = new Key;
+
+var sock = "/tmp/lircd";
+if (remote.lirc_init(sock)) {
+    var str = "Connected to " + sock;
+    trace(str);
+} else {
+    var str = "ERROR: couldn't connect to " + sock;
+    trace(str);
+}
+
+var button = remote.lirc_getButton();
+trace(button);
+
+button = "QUIT";
+
+while (button != "QUIT") {
+    button = remote.lirc_getButton();
+    trace(button);
+}
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]