Change 14073: Update tests to Mac::StandardFile from StandardFile.pl,

[email protected] (Chris Nandor) Fri, 4 Jan 2002 16:53:40 -0500
Newsgroups perl.perl5.changes.mac
Message-ID <p05100305b85bd4a9c3a1@[10.0.1.177]>
Change 14073 by pudge@pudge-mobile on 2002/01/04 20:40:11

	Update tests to Mac::StandardFile from StandardFile.pl,
	plus other fixes

Affected files ...

.... //depot/maint-5.6/macperl/macos/ext/Mac/Menus/t/MenuBar.t#2 edit
.... //depot/maint-5.6/macperl/macos/ext/Mac/Movies/t/PlayMacMovie.t#2 edit
.... //depot/maint-5.6/macperl/macos/ext/Mac/Movies/t/PlayMovie.t#2 edit
.... //depot/maint-5.6/macperl/macos/ext/Mac/QuickTimeVR/t/QTVRControl.t#2 edit
.... //depot/maint-5.6/macperl/macos/ext/Mac/QuickTimeVR/t/QTVRInterceptor.t#2 edit
.... //depot/maint-5.6/macperl/macos/ext/Mac/QuickTimeVR/t/QTVRotator.t#2 edit
.... //depot/maint-5.6/macperl/macos/ext/Mac/Resources/t/Resources.t#2 edit

Differences ...

==== //depot/maint-5.6/macperl/macos/ext/Mac/Menus/t/MenuBar.t#2 (text) ====
Index: perl/macos/ext/Mac/Menus/t/MenuBar.t
--- perl/macos/ext/Mac/Menus/t/MenuBar.t.~1~	Fri Jan  4 13:45:07 2002
+++ perl/macos/ext/Mac/Menus/t/MenuBar.t	Fri Jan  4 13:45:07 2002
@@ -13,10 +13,10 @@
 use Mac::Menus;
 use Mac::Events;
 use Mac::Resources;
+use Mac::Memory;
 
 $res = FSpOpenResFile("MenuBar.rsrc", 0) or die $^E;
 $bar = GetNewMBar(30000);
-print $bar;
 
 $old = GetMenuBar();
 SetMenuBar($bar);

==== //depot/maint-5.6/macperl/macos/ext/Mac/Movies/t/PlayMacMovie.t#2 (text) ====
Index: perl/macos/ext/Mac/Movies/t/PlayMacMovie.t
--- perl/macos/ext/Mac/Movies/t/PlayMacMovie.t.~1~	Fri Jan  4 13:45:07 2002
+++ perl/macos/ext/Mac/Movies/t/PlayMacMovie.t	Fri Jan  4 13:45:07 2002
@@ -16,13 +16,12 @@
 use Mac::Windows;
 use Mac::QuickDraw;
 use Mac::Movies;
-
-require "StandardFile.pl"; 
+use Mac::StandardFile;
 
 sub GetMovie {
-   my($file) = StandardFile::GetFile('MooV');
+   my($file) = StandardGetFile(0, 'MooV');
    die "I'll be back!" unless defined $file;
-   my($resfile) = OpenMovieFile($file);
+   my($resfile) = OpenMovieFile($file->sfFile);
    die $^E unless $resfile;
    my($movie)   = NewMovieFromFile($resfile, 0, newMovieActive);
    die $^E unless $movie;
@@ -33,11 +32,12 @@
 
 EnterMovies() or die $^E;
 
+$movie = GetMovie();
+
 $bounds = new Rect 50, 50, 550, 400;
 $win = new MacWindow $bounds, "You Gotta Move", 1, documentProc, 1;
 
 SetPort($win->window);
-$movie = GetMovie();
 
 $win->new_movie($movie, $win->window->portRect);
 

==== //depot/maint-5.6/macperl/macos/ext/Mac/Movies/t/PlayMovie.t#2 (text) ====
Index: perl/macos/ext/Mac/Movies/t/PlayMovie.t
--- perl/macos/ext/Mac/Movies/t/PlayMovie.t.~1~	Fri Jan  4 13:45:07 2002
+++ perl/macos/ext/Mac/Movies/t/PlayMovie.t	Fri Jan  4 13:45:07 2002
@@ -16,13 +16,12 @@
 use Mac::Windows;
 use Mac::QuickDraw;
 use Mac::Movies;
-
-require "StandardFile.pl"; 
+use Mac::StandardFile;
 
 sub GetMovie {
-   my($file) = StandardFile::GetFile('MooV');
+   my($file) = StandardGetFile(0, 'MooV');
    die "I'll be back!" unless defined $file;
-   my($resfile) = OpenMovieFile($file);
+   my($resfile) = OpenMovieFile($file->sfFile);
    die $^E unless $resfile;
    my($movie)   = NewMovieFromFile($resfile, 0, newMovieActive);
    die $^E unless $movie;
@@ -33,11 +32,12 @@
 
 EnterMovies() or die $^E;
 
+$movie = GetMovie();
+
 $bounds = new Rect 50, 50, 550, 290;
 $win = new MacWindow $bounds, "You Gotta Move", 1, documentProc, 1;
 
 SetPort($win->window);
-$movie = GetMovie();
 $mbox  = GetMovieBox($movie);
 SetMovieBox $movie, OffsetRect($mbox, -$mbox->left, -$mbox->top);
 SetMovieGWorld $movie, $win->window;

==== //depot/maint-5.6/macperl/macos/ext/Mac/QuickTimeVR/t/QTVRControl.t#2 (text) ====
Index: perl/macos/ext/Mac/QuickTimeVR/t/QTVRControl.t
--- perl/macos/ext/Mac/QuickTimeVR/t/QTVRControl.t.~1~	Fri Jan  4 13:45:07 2002
+++ perl/macos/ext/Mac/QuickTimeVR/t/QTVRControl.t	Fri Jan  4 13:45:07 2002
@@ -18,13 +18,12 @@
 use Mac::Movies;
 use Mac::QuickTimeVR;
 use Mac::Sound;
-
-require "StandardFile.pl"; 
+use Mac::StandardFile;
 
 sub GetMovie {
-   my($file) = StandardFile::GetFile('MooV');
+   my($file) = StandardGetFile(0, 'MooV');
    die "I'll be back!" unless defined $file;
-   my($resfile) = OpenMovieFile($file);
+   my($resfile) = OpenMovieFile($file->sfFile);
    die $^E unless $resfile;
    my($movie)   = NewMovieFromFile($resfile, 0, newMovieActive);
    die $^E unless $movie;
@@ -35,11 +34,12 @@
 
 EnterMovies() or die $^E;
 
+$movie = GetMovie();
+
 $bounds = new Rect 50, 50, 550, 400;
 $win = new MacWindow $bounds, "You Gotta Move", 1, documentProc, 1;
 
 SetPort($win->window);
-$movie = GetMovie();
 
 $pane = $win->new_movie($movie, $win->window->portRect);
 $track = QTVRGetQTVRTrack($movie, 1);  die $^E unless $track;

==== //depot/maint-5.6/macperl/macos/ext/Mac/QuickTimeVR/t/QTVRInterceptor.t#2 (text) ====
Index: perl/macos/ext/Mac/QuickTimeVR/t/QTVRInterceptor.t
--- perl/macos/ext/Mac/QuickTimeVR/t/QTVRInterceptor.t.~1~	Fri Jan  4 13:45:07 2002
+++ perl/macos/ext/Mac/QuickTimeVR/t/QTVRInterceptor.t	Fri Jan  4 13:45:07 2002
@@ -18,13 +18,12 @@
 use Mac::Movies;
 use Mac::QuickTimeVR;
 use Mac::Sound;
-
-require "StandardFile.pl"; 
+use Mac::StandardFile;
 
 sub GetMovie {
-   my($file) = StandardFile::GetFile('MooV');
+   my($file) = StandardGetFile(0, 'MooV');
    die "I'll be back!" unless defined $file;
-   my($resfile) = OpenMovieFile($file);
+   my($resfile) = OpenMovieFile($file->sfFile);
    die $^E unless $resfile;
    my($movie)   = NewMovieFromFile($resfile, 0, newMovieActive);
    die $^E unless $movie;

==== //depot/maint-5.6/macperl/macos/ext/Mac/QuickTimeVR/t/QTVRotator.t#2 (text) ====
Index: perl/macos/ext/Mac/QuickTimeVR/t/QTVRotator.t
--- perl/macos/ext/Mac/QuickTimeVR/t/QTVRotator.t.~1~	Fri Jan  4 13:45:07 2002
+++ perl/macos/ext/Mac/QuickTimeVR/t/QTVRotator.t	Fri Jan  4 13:45:07 2002
@@ -17,13 +17,12 @@
 use Mac::QuickDraw;
 use Mac::Movies;
 use Mac::QuickTimeVR;
-
-require "StandardFile.pl"; 
+use Mac::StandardFile;
 
 sub GetMovie {
-   my($file) = StandardFile::GetFile('MooV');
+   my($file) = StandardGetFile(0, 'MooV');
    die "I'll be back!" unless defined $file;
-   my($resfile) = OpenMovieFile($file);
+   my($resfile) = OpenMovieFile($file->sfFile);
    die $^E unless $resfile;
    my($movie)   = NewMovieFromFile($resfile, 0, newMovieActive);
    die $^E unless $movie;

==== //depot/maint-5.6/macperl/macos/ext/Mac/Resources/t/Resources.t#2 (text) ====
Index: perl/macos/ext/Mac/Resources/t/Resources.t
--- perl/macos/ext/Mac/Resources/t/Resources.t.~1~	Fri Jan  4 13:45:07 2002
+++ perl/macos/ext/Mac/Resources/t/Resources.t	Fri Jan  4 13:45:07 2002
@@ -7,10 +7,10 @@
 
 use Mac::Resources;
 use Mac::Memory;
-require "StandardFile.pl";
+use Mac::StandardFile;
 
-$file = $ARGV[0] || StandardFile::GetFile();
-$res = OpenResFile($file) || die "$^E";
+$file = $ARGV[0] || StandardGetFile(0, '');
+$res = OpenResFile($file->sfFile) || die "$^E";
 
 print "Types: ", Count1Types(), "\n\n";
 
@@ -19,7 +19,7 @@
 	print "Resources of type ³$type²: ", Count1Resources($type), "\n";
 	for ($rsrcs = Count1Resources($type); $rsrcs; --$rsrcs) {
 		$rsrc = Get1IndResource($type, $rsrcs);
-		($id, $type, $name) = GetResInfo($rsrc);
+		my($id, $type, $name) = GetResInfo($rsrc);
 		printf("%4s %6d %s\n", $type, $id, $name);
 	}
 }
End of Patch.