This adds the line handler to the string stream to provide callbacks
when a line is known to be available.
This change also refactors parts of the string stream to avoid
converting decoded char codes to a string before checking for line
break sequences. With this change the string decoder tracks all line
breaks.
There is still room for improvement as e.g. the coping of the list of
char codes when reading lines can be avoided by using anoher offset.
R=ager@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8772008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2016 260f80e4-7a28-3924-810f-c04153c831b5
./tools/test.dart -mdebug,release
Make the patterns given to the test script more restrictive. A pattern
has to specify the test suite as the first component. The rest is used
as a pattern on all tests within that suite:
./tools/test.dart -mrelease leg co19/leg
will run the leg tests and the co19 tests that contains the substring
'leg' somewhere in the full path name of the test.
R=whesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8772007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2014 260f80e4-7a28-3924-810f-c04153c831b5
The accept method have been removed from the ServerSocket class and
the signature for the connectionHandler callback have been changed to
provide the accepted socket as an argument.
This is to avoid the possibility for accept to return null even in the
case of pending connection. This could happen if an error like EAGAIN,
EWOULDBLOCK and EINTR was returned by it OS accept call and previously
there was no way of propagating this without returning null from the
Dart call to accept.
R=ager@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8726031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1889 260f80e4-7a28-3924-810f-c04153c831b5
1. Ignore the signal SIGPIPE on Linux and Mac OS
When reading from or writing to a closed pipe the signal SIGPIPE
is raised. The default handling of this is to terminate the
program. When signal SIGPIPE is ignored the read and write
returns EPIPE.
2. Wrong return type for stdio getter
3. When there is an error on a socket mark it as closed
4. Mark the pipe used for process exit status as a one way pipe
5. Add tests to test stdin, stdout and stderr in Dart scripts
R=ager@google.com
BUG=dart:536, dart:454
TEST=
Review URL: http://codereview.chromium.org//8662006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1793 260f80e4-7a28-3924-810f-c04153c831b5
Read the entire file in one go and find all matches of the regexps.
This reads the file with the assumption that one byte is a char.
For the things we are looking for that will be ok.
No need to pass special options to get a larger new space. We
run corelib, standalone and co19 in roughly 10sec on my machine.
With the python version we are at 6sec.
R=whesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8486009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1569 260f80e4-7a28-3924-810f-c04153c831b5
Updated the TestExpectations class to be able to deal with the
odd matching rules that are used for co19.
Currently we are using a lot of memory when running all of these
tests. I have optimized the test expectation part quite a bit.
The thing that seems bad now if the processing of all the lines
of every simple test to find DartOptions. We need to work on that.
R=whesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8539044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1563 260f80e4-7a28-3924-810f-c04153c831b5
When using stdout/stderr it is no longer necessary to explicitly
close the streams for the program to terminate. The automatic
close is handled by always closing the associated receive port
for write only streams when not waiting for any events. If a
close or error handler is installed for stdout/stderr these will
still keep the program alive.
For stdin better handling of the difference between sockets and
pipes have been immplemented. As a special case for stdin when
reading from a terminal the a POLLIN signal with 0 available
bytes is treated as end-of-file. This will trigger when pressing
ctrl-d in a terminal as POLLHUP is not set in that situation.
R=ager@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8533005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1507 260f80e4-7a28-3924-810f-c04153c831b5
At this point it is not that compact because print always prints
a newline and therefore we cannot reuse the same line in the output.
I will update that when we have access to stdout stream.
Removed asserts that fail when test script is run from runtime
directory.
Removed debugging output from status file parsing.
R=whesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8523009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1452 260f80e4-7a28-3924-810f-c04153c831b5
The handling of async IO on Windows wrongly casted everything to a socket connection. For named pipe based connections this caused reading of invalid memory.
Moved some of the functions to a common superclass and only call showdown for socket connections. For named pipe based connections the Dart part of the code will never send shutdown commands as named pipe based connections start out being closed in one direction and closing the other direction causes a close command.
R=ager@google.com
BUG=dart:363
TEST=
Review URL: http://codereview.chromium.org//8503006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1308 260f80e4-7a28-3924-810f-c04153c831b5