Permalink
Browse files

Update the tests to use 'README.pod' && a update to the copyright dat…

…e of 'README.pod'
  • Loading branch information...
1 parent e63f22d commit e254d5276796091722154012123701326d09253a @ayardley ayardley committed Apr 27, 2012
Showing with 90 additions and 54 deletions.
  1. +52 −21 README.pod
  2. +5 −5 t/dynoplibs/io.t
  3. +6 −6 t/dynpmc/select.t
  4. +10 −8 t/pmc/filehandle.t
  5. +5 −4 t/pmc/parrotio.t
  6. +12 −10 t/pmc/stringhandle.t
View
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2011, Parrot Foundation.
+# Copyright (C) 2001-2012, Parrot Foundation.
=pod
@@ -20,18 +20,24 @@ For more details, see the full text of the license in the file 'LICENSE'.
You need a C compiler, a linker, and a 'make' program.
-If you plan to link Parrot with the ICU library, you must download and install it I<before> configuring Parrot. You may obtain the ICU library at http://site.icu-project.org/download.
+If you plan to link Parrot with the ICU library, you must download and install
+it I<before> configuring Parrot. You may obtain the ICU library at
+http://site.icu-project.org/download.
-You will also need Perl 5.8.4 or newer and Storable 2.12 or newer in order to run various configure and build scripts.
+You will also need Perl 5.8.4 or newer and Storable 2.12 or newer in order to
+run various configure and build scripts.
-For most of the platforms we support, Parrot should build out-of-the-box. 'docs/parrot.pod' lists the core platforms, and 'PLATFORMS' provides reports on the platforms on which Parrot has been built and tested.
+For most of the platforms we support, Parrot should build out-of-the-box.
+'docs/parrot.pod' lists the core platforms, and 'PLATFORMS' provides reports
+on the platforms on which Parrot has been built and tested.
=head1 HOW TO GET PARROT FROM GITHUB
=head2 I. Install Git.
Linux:
-The method depends on your distribution. To install you should execute (as root or sudo <cmd>):
+The method depends on your distribution. To install you should execute (as
+root or sudo <cmd>):
On Ubuntu/Debian (apt-based):
@@ -52,7 +58,8 @@ There are 2 Git ports on Windows:
TortoiseGit http://code.google.com/p/tortoisegit/downloads/list
Macintosh OS X:
-An Internet search will locate a variety of git installers for Mac OS X, for example,
+An Internet search will locate a variety of git installers for Mac OS X, for
+example,
http://help.github.com/mac-git-installation/
@@ -62,23 +69,30 @@ To obtain a copy of the Parrot Git repository:
git clone git://github.com/parrot/parrot.git
-This will checkout the master branch by default. To create a local branch which tracks the branch "some_branch":
+This will checkout the master branch by default. To create a local branch
+which tracks the branch "some_branch":
git checkout -b --track some_branch origin/some_branch
-All the above URLs are read-only. If you are a Parrot core developer, then use the read-write URL:
+All the above URLs are read-only. If you are a Parrot core developer, then
+use the read-write URL:
git clone git@github.com:parrot/parrot.git
You can view the list of branches at http://github.com/parrot/parrot
=head1 INSTRUCTIONS
-For now, unpack your Parrot tarball, (if you're reading this, you've probably already done that) and type
+For now, unpack your Parrot tarball, (if you're reading this, you've probably
+already done that) and type
perl Configure.pl --optimize
-to run the Configure script. The 'Configure.pl' script extracts configuration information from the running perl5 program. You may need to explicitly tell 'Configure.pl' which compiler and linker to use. For example, to compile C files with 'cc', C++ files with 'CC', and link everything together with 'CC', you would type
+to run the Configure script. The 'Configure.pl' script extracts configuration
+information from the running perl5 program. You may need to explicitly tell
+'Configure.pl' which compiler and linker to use. For example, to compile C
+files with 'cc', C++ files with 'CC', and link everything together with 'CC',
+you would type
perl Configure.pl --cc=cc --link=CC --ld=CC
@@ -94,46 +108,63 @@ module, platform files, and many Makefiles.
The file 'myconfig' has an overview of configure settings.
-Next, run 'make'. ('Configure.pl' will tell you which version of 'make' it recommends for your system.)
+Next, run 'make'. ('Configure.pl' will tell you which version of 'make' it
+recommends for your system.)
-Now, the interpreter should build. If you are building the ICU library (this is the default on most systems), you need to use 'GNU make' instead (or something compatible with it).
+Now, the interpreter should build. If you are building the ICU library (this
+is the default on most systems), you need to use 'GNU make' instead (or
+something compatible with it).
-You can test Parrot by running 'make test'. You can run the tests in parallel with 'make TEST_JOBS=3 test'.
+You can test Parrot by running 'make test'. You can run the tests in parallel
+with 'make TEST_JOBS=3 test'.
You can run the full test suite with
make fulltest
-NOTE: PLATFORMS contains notes about whether test failures are expected on your system.
+NOTE: PLATFORMS contains notes about whether test failures are expected on
+your system.
You can install Parrot with,
make install
-By default, this installs in '/usr/local', with the Parrot executable in '/usr/local/bin'. If you want to install Parrot into another location use the following:
+By default, this installs in '/usr/local', with the Parrot executable in
+'/usr/local/bin'. If you want to install Parrot into another location use the
+following:
perl Configure.pl --prefix=/dir/to/install/
make install
-But please note, the dynamic libs will not be found for non-standard locations unless you set the enviornment variable 'LD_LIBRARY_PATH' or something similar.
+But please note, the dynamic libs will not be found for non-standard locations
+unless you set the enviornment variable 'LD_LIBRARY_PATH' or something similar.
-For where to go from here, I<see> F<docs/parrot.pod> and I<see> F<docs/intro.pod>. If you experience problems, please I<see> the section "How To Submit A Bug Report" in F<docs/submissions.pod>. These documents are in POD format, and you can view them with the command,
+For where to go from here, I<see> F<docs/parrot.pod> and I<see>
+F<docs/intro.pod>. If you experience problems, please I<see> the section
+"How To Submit A Bug Report" in F<docs/submissions.pod>. These documents are
+in POD format, and you can view them with the command,
perldoc -F docs/intro.pod
=head1 CHANGES
-For documentation on the user-visible changes between this and previous versions of Parrot, I<see> 'ChangeLog'.
+For documentation on the user-visible changes between this and previous
+versions of Parrot, I<see> 'ChangeLog'.
=head1 MAILING LISTS
-The Parrot user mailing list is 'parrot-users@lists.parrot.org'. You may subscribe to the mailing list by filling out the form at http://lists.parrot.org/mailman/listinfo/parrot-users. There is an archive of the mailing list at http://lists.parrot.org/pipermail/parrot-users/.
+The Parrot user mailing list is 'parrot-users@lists.parrot.org'. You may
+subscribe to the mailing list by filling out the form at
+http://lists.parrot.org/mailman/listinfo/parrot-users. There is an archive
+of the mailing list at http://lists.parrot.org/pipermail/parrot-users/.
-For development discussions, I<see> the information in F<docs/gettingstarted.pod>.
+For development discussions, I<see> the information in
+F<docs/gettingstarted.pod>.
=head1 FEEDBACK, PATCHES, etc.
-For more information on how to report bugs and to submit patches, I<see> F<docs/submissions.pod>.
+For more information on how to report bugs and to submit patches, I<see>
+F<docs/submissions.pod>.
=head1 WEB SITES
View
@@ -261,7 +261,7 @@ CODE
.end
.sub 'test_open_p_s_s'
- $S0 = "README"
+ $S0 = "README.pod"
$S1 = "r"
$P0 = open $S0, $S1
$I0 = defined $P0
@@ -270,7 +270,7 @@ CODE
.sub 'test_seek_tell'
$S0 = 'r'
- $P0 = open "README", $S0
+ $P0 = open "README.pod", $S0
$I0 = tell $P0
is( $I0, 0, 'tell_i_p' )
@@ -403,8 +403,8 @@ CODE
.sub 'test_peek'
.include 'stat.pasm'
- $I0 = stat 'README', .STAT_FILESIZE
- $P0 = open 'README', 'r'
+ $I0 = stat 'README.pod', .STAT_FILESIZE
+ $P0 = open 'README.pod', 'r'
close $P0
$P1 = getstdin
@@ -423,7 +423,7 @@ CODE
.sub 'test_read'
getstdin $P1
- $P0 = open 'README', 'r'
+ $P0 = open 'README.pod', 'r'
$I0 = 4
setstdin $P0
View
@@ -61,13 +61,13 @@ it to become ready for an I/O operation.
$P9 = 'FH1'
$P0 = new ['FileHandle']
- $P0.'open'('README')
+ $P0.'open'('README.pod')
$P1 = new ['Select']
$P1.'update'($P0, $P9, 5)
$P3 = new ['FileHandle']
- $P3.'open'('README')
+ $P3.'open'('README.pod')
$P9 = new 'String'
$P9 = 'FH2'
@@ -108,18 +108,18 @@ it to become ready for an I/O operation.
$P9 = 'FH1'
$P0 = new ['FileHandle']
- $P0.'open'('README')
+ $P0.'open'('README.pod')
$P1 = new ['Select']
$P1.'update'($P0, $P9, 5)
$P6 = $P1.'can_read'(1)
$I0 = $P6
- is($I0, 1, 'Test can_read() for README')
+ is($I0, 1, 'Test can_read() for README.pod')
$P6 = $P1.'can_write'(0)
$I0 = $P6
- is($I0, 0, 'Test can_write() for README')
+ is($I0, 0, 'Test can_write() for README.pod')
.end
.sub 'test_write'
@@ -156,7 +156,7 @@ it to become ready for an I/O operation.
$P9 = 'FH1'
$P0 = new ['FileHandle']
- $P0.'open'('README', 'r')
+ $P0.'open'('README.pod', 'r')
$P1 = new ['Select']
$P1.'update'($P0, $P9, 5)
View
@@ -201,14 +201,15 @@ pir_output_is(
$P0 = new ['FileHandle']
$P0.'open'('README.pod')
- $S0 = $P0.'read'(14) # bytes
- if $S0 == 'This is Parrot' goto ok_1
+ $S0 = $P0.'read'(15) # bytes
+ if $S0 == '# Copyright (C)' goto ok_1
print 'not '
ok_1:
say 'ok 1 - $S0 = $P1.read($I2)'
- $S0 = $P0.'read'(9) # bytes
- if $S0 == ', version' goto ok_2
+ $S0 = $P0.'read'(12) # throw away bytes
+ $S0 = $P0.'read'(17) # bytes
+ if $S0 == 'Parrot Foundation' goto ok_2
print 'not '
ok_2:
say 'ok 2 - $S0 = $P1.read($I2) # again on same stream'
@@ -226,16 +227,17 @@ pir_output_is(
fh = new ['FileHandle']
fh.'open'('README.pod')
- bb = fh.'read_bytes'(14)
+ bb = fh.'read_bytes'(15)
$S0 = bb.'get_string'('ascii')
- if $S0 == 'This is Parrot' goto ok_1
+ if $S0 == '# Copyright (C)' goto ok_1
print 'not '
ok_1:
say 'ok 1 - read_bytes'
- bb = fh.'read_bytes'(9) # bytes
+ bb = fh.'read_bytes'(12) # throw away bytes
+ bb = fh.'read_bytes'(17) # bytes
$S0 = bb.'get_string'('utf8')
- if $S0 == ', version' goto ok_2
+ if $S0 == 'Parrot Foundation' goto ok_2
print 'not '
ok_2:
say 'ok 2 - read_bytes # again on same stream'
View
@@ -123,14 +123,15 @@ pir_output_is(
$P0 = new ['FileHandle']
$P0.open('README.pod')
- $S0 = $P0.read(14) # bytes
- if $S0 == 'This is Parrot' goto ok_1
+ $S0 = $P0.read(15) # bytes
+ if $S0 == '# Copyright (C)' goto ok_1
print 'not '
ok_1:
say 'ok 1 - $S0 = $P1.read($I2)'
- $S0 = $P0.read(9) # bytes
- if $S0 == ', version' goto ok_2
+ $S0 = $P0.read(12) # throw away bytes
+ $S0 = $P0.read(17) # bytes
+ if $S0 == 'Parrot Foundation' goto ok_2
print 'not '
ok_2:
say 'ok 2 - $S0 = $P1.read($I2) # again on same stream'
View
@@ -149,20 +149,21 @@ pir_output_is(
$P0 = new ['StringHandle']
$P0.'open'('README.pod', 'w')
- $P0.'print'("This is Parrot, version")
+ $P0.'print'("# Copyright (C) 2001-2012, Parrot Foundation.")
$P0.'close'()
$P0.'open'('README.pod')
- $S0 = $P0.'read'(14) # bytes
- if $S0 == 'This is Parrot' goto ok_1
+ $S0 = $P0.'read'(15) # bytes
+ if $S0 == '# Copyright (C)' goto ok_1
print 'not '
ok_1:
say 'ok 1 - $S0 = $P1.read($I2)'
- $S0 = $P0.'read'(9) # bytes
- if $S0 == ', version' goto ok_2
+ $S0 = $P0.'read'(12) # throw away bytes
+ $S0 = $P0.'read'(17) # bytes
+ if $S0 == 'Parrot Foundation' goto ok_2
print 'not '
ok_2:
say 'ok 2 - $S0 = $P1.read($I2) # again on same stream'
@@ -178,19 +179,20 @@ pir_output_is(
$P0 = new ['StringHandle']
$P0.'open'('README.pod', 'w')
- print $P0, "This is Parrot, version"
+ print $P0, "# Copyright (C) 2001-2012, Parrot Foundation."
$P0.'close'()
$P0.'open'('README.pod')
- $S0 = $P0.'read'(14) # bytes
- if $S0 == 'This is Parrot' goto ok_1
+ $S0 = $P0.'read'(15) # bytes
+ if $S0 == '# Copyright (C)' goto ok_1
print 'not '
ok_1:
say 'ok 1 - $S0 = $P1.read($I2)'
- $S0 = $P0.'read'(9) # bytes
- if $S0 == ', version' goto ok_2
+ $S0 = $P0.'read'(12) # throw away bytes
+ $S0 = $P0.'read'(17) # bytes
+ if $S0 == 'Parrot Foundation' goto ok_2
print 'not '
ok_2:
say 'ok 2 - $S0 = $P1.read($I2) # again on same stream'

0 comments on commit e254d52

Please sign in to comment.