Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11812/Win32-GUI-Scintilla/t
Modified Files:
02_new.t
Added Files:
03_LoadFile.t 55_crash.t
Log Message:
Fix cygwin crash and add new tests
Index: 02_new.t
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Scintilla/t/02_new.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** 02_new.t 11 Jun 2006 16:51:50 -0000 1.1
--- 02_new.t 31 Jan 2008 00:34:20 -0000 1.2
***************
*** 1,3 ****
! #!perl -wT
# Win32::GUI::Scintilla test suite
# $Id$
--- 1,3 ----
! #!perl -w
# Win32::GUI::Scintilla test suite
# $Id$
***************
*** 10,19 ****
BEGIN { $| = 1 } # Autoflush
! use Test::More tests => 2;
! use Win32::GUI();
! use Win32::GUI::Scintilla();
can_ok('Win32::GUI::Scintilla', 'new');
my $W = Win32::GUI::Window->new();
my $S = $W->AddScintilla();
isa_ok($S, 'Win32::GUI::Scintilla', 'Correct object type created');
--- 10,29 ----
BEGIN { $| = 1 } # Autoflush
! use Test::More tests => 6;
!
! use Win32::GUI qw();
! use Win32::GUI::Scintilla qw();
! use Win32::GUI::Scintilla::Perl qw();
can_ok('Win32::GUI::Scintilla', 'new');
+ can_ok('Win32::GUI::Window', 'AddScintilla');
+ can_ok('Win32::GUI::Scintilla::Perl', 'new');
+ can_ok('Win32::GUI::Window', 'AddScintillaPerl');
+
my $W = Win32::GUI::Window->new();
+
my $S = $W->AddScintilla();
isa_ok($S, 'Win32::GUI::Scintilla', 'Correct object type created');
+
+ my $P = $W->AddScintillaPerl();
+ isa_ok($P, 'Win32::GUI::Scintilla', 'Correct object type created');
--- NEW FILE: 55_crash.t ---
#!perl -wT
# Win32::GUI::Scintilla test suite
# $Id: 55_crash.t,v 1.1 2008/01/31 00:34:20 robertemay Exp $
#
# These tests performed at the end, as they may well crash.
use strict;
use warnings;
BEGIN { $| = 1 } # Autoflush
use Test::More tests => 1;
use Win32::GUI qw();
use Win32::GUI::Scintilla qw();
# cygwin (only) crashes with 1.05 at demos/Editor.pl and
# scripts/win32-gui-demos in the scintilla callback.
# Was due to #define PERL_NO_GET_CONTEXT in Scintilla.h
# causing perlud to be different sizes for Win32::GUI and
# Win32::GUI::Scintilla.
Win32::GUI::Window->new->AddScintilla()->SetFocus(0);
pass("Didn't crash");
--- NEW FILE: 03_LoadFile.t ---
#!perl -wT
# Win32::GUI::Scintilla test suite
# $Id: 03_LoadFile.t,v 1.1 2008/01/31 00:34:20 robertemay Exp $
#
# cygwin (only) crashes with 1.05 at demos/Editor.pl and
# scripts/win32-gui-demos in the scintilla callback.
use strict;
use warnings;
BEGIN { $| = 1 } # Autoflush
use Test::More tests => 5;
use Win32::GUI qw();
use Win32::GUI::Scintilla qw();
use Win32::GUI::Scintilla::Perl qw();
can_ok('Win32::GUI::Scintilla', 'LoadFile');
my $W = Win32::GUI::Window->new();
my $S = $W->AddScintilla();
my $P = $W->AddScintillaPerl();
isa_ok($S, 'Win32::GUI::Scintilla', 'Correct object type created');
isa_ok($P, 'Win32::GUI::Scintilla', 'Correct object type created');
ok($P->LoadFile(__FILE__), 'Scintilla can load a file');
ok($S->LoadFile(__FILE__), 'ScintillaPerl can load a file');
|