Zichang Guo
a3322ad622
[dart:io] Use empty path on Windows leads to error
...
Bug: https://github.com/dart-lang/sdk/issues/42938
Change-Id: Id988420fd14caf6ac985aa4de0b974f344809e51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157942
Commit-Queue: Zichang Guo <zichangguo@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2020-09-02 20:49:37 +00:00
Lasse Reichstein Holst Nielsen
69ba6e5f80
Make FileSystemEntity.absolutePath understand more Windows paths.
...
Change-Id: I3bd1e885a5bbc118e80e9bce88cb2c216318de93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155126
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Zichang Guo <zichangguo@google.com >
Reviewed-by: Jonas Termansen <sortie@google.com >
2020-07-23 12:05:28 +00:00
Liam Appelbe
3083050258
[nnbd] Fix some IO strong mode tests
...
Fixes:
standalone/io/directory_test
standalone/io/file_test
standalone/io/http_read_test/*
standalone/io/http_reuse_server_port_test/*
standalone/io/http_server_early_client_close_test/*
standalone/io/regress_8828_test/*
standalone/io/socket_cancel_connect_test/*
standalone/io/socket_finalizer_test/*
standalone/io/web_socket_typed_data_test/*
Change-Id: I46b7d8691b66222b61b72bfe4d29ce81fadf511f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143182
Commit-Queue: Liam Appelbe <liama@google.com >
Reviewed-by: Jonas Termansen <sortie@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2020-04-14 18:03:55 +00:00
Jonas Termansen
3433d8cfc3
[nnbd] Migrate standalone/io to NNBD.
...
The tests are also now dartfmt.
Bug: https://github.com/dart-lang/sdk/issues/40040
Change-Id: I8dece8097b37b70d47a5374dae2f3fadb0fc4b90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134338
Commit-Queue: Jonas Termansen <sortie@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
2020-02-07 14:41:36 +00:00
Siva Annamalai
bc4860b0cb
Most VM specific tests in standalone have been moved to standalone_2 and are being run in the regular bot tests. These tests are for VM functionality like io, process API etc. and have no strong mode implications. Currently we are running these tests twice once from standalone and once from standalone_2.
...
This CL removes these redundant tests from the standalone directory.
Bug:
Change-Id: Ib0adfa67fffa4de486e847698e18353fb4dd8a46
Reviewed-on: https://dart-review.googlesource.com/18429
Commit-Queue: Siva Annamalai <asiva@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
2017-11-07 23:00:00 +00:00
William Hesse
7bf2788bcc
Restore all deleted tests to tests/standalone from migration to standalone_2
...
We are no longer deleting tests from the Dart 1 test directories when we
add them to the _2 directories. This reverts the part of change
https://dart-review.googlesource.com/c/sdk/+/12240 that modifies
the tests/standlone directory.
Bug:
Change-Id: Ie26b185234d0d18736a2fa13b77c5fd42cbb7e92
Reviewed-on: https://dart-review.googlesource.com/12287
Reviewed-by: Morten Krogh-jespersen <mkroghj@google.com >
2017-10-09 10:46:55 +00:00
Siva Annamalai
bd2a8e1d60
Reland migrate most of the tests in standalone to be strong mode clean and move them to standalone_2 directory.
...
Bug:
Change-Id: I4ca50f315361422db1d4356055862463bfe1d6f3
Reviewed-on: https://dart-review.googlesource.com/12240
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2017-10-07 01:29:36 +00:00
Siva Annamalai
ff32187145
Revert "Migrate most of the tests in standalone to be strong mode clean and move"
...
This reverts commit c85563f582 .
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Migrate most of the tests in standalone to be strong mode clean and move
> them to standalone_2 directory.
>
> Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
> Reviewed-on: https://dart-review.googlesource.com/6080
> Reviewed-by: Ben Konyi <bkonyi@google.com >
TBR=bkonyi@google.com ,asiva@google.com
Change-Id: I3c7b6081f17fca45e7828603538f50d06417e2be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/12020
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2017-10-06 17:24:20 +00:00
Siva Annamalai
c85563f582
Migrate most of the tests in standalone to be strong mode clean and move
...
them to standalone_2 directory.
Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
Reviewed-on: https://dart-review.googlesource.com/6080
Reviewed-by: Ben Konyi <bkonyi@google.com >
2017-10-06 17:07:34 +00:00
Florian Loitsch
8f3ae7e7e1
Revert "Throw when adding something to a closed sink and improve documentation."
...
This reverts commit 8e19729b89 .
BUG=
Review-Url: https://codereview.chromium.org/2864443002 .
2017-05-04 12:52:47 +02:00
Florian Loitsch
8e19729b89
Throw when adding something to a closed sink and improve documentation.
...
As port of this CL all changes of https://codereview.chromium.org/20036002 are reverted.
Also fixes issue 29122.
BUG= http://dartbug.com/29122
R=lrn@google.com , whesse@google.com
Review-Url: https://codereview.chromium.org/2822173002 .
2017-05-04 11:42:22 +02:00
Jacob Richman
2dcd56ef43
Format all tests.
...
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.
BUG=
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
Zach Anderson
30da80fb17
[dart:io][windows] Set up CRT error handling behavior
...
fixes #28852
R=fschneider@google.com
Review-Url: https://codereview.chromium.org/2710103002 .
2017-02-22 13:55:07 -08:00
Zachary Anderson
3f5458cdcb
[dart:io] Adds functions to set file access and modification time
...
fixes #27877
R=asiva@google.com , floitsch@google.com
Review-Url: https://codereview.chromium.org/2681683005 .
2017-02-09 09:45:25 -08:00
Zachary Anderson
5c8510bca5
Make RandomAccessFile.writeFrom use the correct starting offset
...
fixes #28174
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2615673002 .
2017-01-04 09:33:28 -08:00
Zachary Anderson
1f6c914d67
Signal an error for File.lastModified on a directory
...
fixes #28173
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2616463004 .
2017-01-04 07:50:35 -08:00
Zachary Anderson
128313ec3c
Signal an error for File.length on a directory
...
fixes #28172
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2615473002 .
2017-01-03 15:06:23 -08:00
Ryan Macnak
93e55dbe6e
Adjust tests/standalone/io/file_test not to resolve relative to Platform.executable.
...
Fixes #27748
R=asiva@google.com
Review URL: https://codereview.chromium.org/2477903002 .
2016-11-03 16:18:40 -07:00
Ryan Macnak
6c9ec4d265
Attempt to fix Windows path issue.
...
Review URL: https://codereview.chromium.org/2479593003 .
2016-11-03 09:38:24 -07:00
Ryan Macnak
0c3773fd71
Allow Platform.executable for JIT app snapshots.
...
Because they run on a VM that can also run from source, they don't have the same fork-bomb problem we have when running with AOT.
Related to #26417
R=asiva@google.com
Review URL: https://codereview.chromium.org/2466363003 .
2016-11-02 16:28:09 -07:00
Søren Gjesse
e382e87e65
Close files used in some tests
...
On windows forgetting to close files causes the deletion of the
temporary test directory to fail.
R=whesse@google.com
BUG=http://dartbug.com/23521
Review URL: https://codereview.chromium.org//1146283006
2015-05-27 15:31:30 +02:00
Søren Gjesse
f05608c49d
Fix errors in previous commit
...
Commit was https://github.com/dart-lang/sdk/commit/897d05b6f0a80c7ba6933a059018184b724f5316 .
TBR=lrn@google.com
BUG=http://dartbug.com/23521
Review URL: https://codereview.chromium.org//1145403004
2015-05-27 11:18:03 +02:00
Søren Gjesse
897d05b6f0
Fix argument processing for RandomAccessFile.writeFrom
...
It is now the same as for RandomAccessFile.writeFromSync
Added some tests.
R=lrn@google.com
BUG=http://dartbug.com/23521
Review URL: https://codereview.chromium.org//1156993003
2015-05-27 10:01:24 +02:00
kustermann@google.com
aeba7a23b1
Fix race condition in tests/standalone/io/file_test
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//920473002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43683 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 14:32:55 +00:00
ricow@google.com
10595e509d
Make standalone tests not dependent on current working directory.
...
This also simplifies DartOptions - could we simply remove it, the only usage is the arguments test which could simply call the vm on another file, and validate the output?
R=iposva@google.com , sgjesse@google.com
BUG=
Review URL: https://codereview.chromium.org//899243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43511 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 16:29:39 +00:00
ajohnsen@google.com
82f487f92f
Fix File:copy FD leak, and add file-closes to some tests.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//233053004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34961 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-11 07:48:49 +00:00
ajohnsen@google.com
5046164a3f
Test file write of sub-list.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//206393003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34167 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 13:48:32 +00:00
sgjesse@google.com
0aa1345b12
Add optional flush argument to some file methods
...
BUG=http://dartbug.com/8794
R=whesse@google.com , ajohnsen@google.com
Review URL: https://codereview.chromium.org//20745006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29880 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 08:46:50 +00:00
floitsch@google.com
7006de6f23
Remove deprecated parts of dart:async.
...
Attempt to fix most uses of the deprecated features.
R=floitsch@google.com , nweiz@google.com , rnystrom@google.com
Review URL: https://codereview.chromium.org//48483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29628 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:24:29 +00:00
lrn@google.com
f0a1c922a2
Reapply "Remove @deprecated features."
...
R=scheglov@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//50413005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29535 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 12:09:15 +00:00
ajohnsen@google.com
103eac574c
Remove FileException, DirectoryException and LinkException from dart:io and use FileSystemException instaed.
...
BUG=https://code.google.com/p/dart/issues/detail?id=12461
R=nweiz@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//26968003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29168 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:17:20 +00:00
whesse@google.com
c9e4b7f7cd
dart:io | Fix File.rename on Windows to overwrite an existing target.
...
BUG=dartbug.com/14164
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//28553006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28933 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 14:57:35 +00:00
whesse@google.com
2a987cceea
Modify tests to use Directory.systemTemp.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25471003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28219 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 13:28:35 +00:00
ajohnsen@google.com
8323221e70
Only allow one async operation on RandomAccessFile at a time.
...
This is to make sure we never have a race-condition on the same
File*/FD. For a File it should be fine, as each operation will open it's
own FD to work on.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//24721003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28088 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 11:23:32 +00:00
ajohnsen@google.com
a347038cd7
Merge services into a shared IOService in dart:io, and use a native port.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//24395013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27883 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 15:03:24 +00:00
whesse@google.com
4fc5c84809
Recommit add FileSystemEntity.resolveSymbolicLinks
...
This was reverted in r27481 because of a failure on the debug Windows VM buildbot.
BUG=dartbug.com/1016
Review URL: https://codereview.chromium.org//23480093
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27612 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 12:29:47 +00:00
whesse@google.com
31c85401eb
Revert "dart:io | Change File.fullPath to FileSystemEntity.resolveSymbolicLinks."
...
This reverts commit r27475.
BUG=dartbug.com/1016
Review URL: https://codereview.chromium.org//23658048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27481 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 15:00:26 +00:00
whesse@google.com
f9ba5f494d
dart:io | Change File.fullPath to FileSystemEntity.resolveSymbolicLinks.
...
BUG=dartbug.com/1016
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23444037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27475 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 11:15:12 +00:00
ajohnsen@google.com
c04ce303ce
Fix file_test after changing exception throw from readAsStringSync in File.
...
BUG=
Review URL: https://codereview.chromium.org//23526033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27330 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 11:37:35 +00:00
ajohnsen@google.com
d49e9b1bd3
Make sure we always have an 'open' asyncStart, while running tests in file_test.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23766010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27188 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 10:58:51 +00:00
ajohnsen@google.com
1b9e2e8160
Run testReadAsText wrapped in createTempDirectory, as it uses the shared temp directory.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23956004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27180 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 08:53:08 +00:00
sgjesse@google.com
18c75d3dc2
Update dart:io tests to use asyncStart/asyncEnd
...
R=ajohnsen@google.com
BUG=http://dartbug.com/12977
Review URL: https://codereview.chromium.org//23886004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27054 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 13:42:56 +00:00
floitsch@google.com
35d7140e66
Remove Encoding-enum from dart:io and add interface in dart:convert.
...
BUG= http://dartbug.com/6284
BUG= http://dartbug.com/7966
R=nweiz@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//22872012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26632 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:37:25 +00:00
whesse@google.com
884436dcb9
Remove uses of Path class from tests/standalone.
...
BUG=
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//19967002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25399 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-24 07:45:06 +00:00
ajohnsen@google.com
9a54097f86
Don't throw exceptions when adding to a IOSink(StreamSink) after close.
...
As the IOSink can be closed from the consumer, it leads to unexpected
exceptions.
BUG=http://code.google.com/p/dart/issues/detail?id=11952
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//20036002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25337 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 10:37:47 +00:00
sgjesse@google.com
887c8e7596
Move getters from Options to Platform
...
The getters for executable, script and version are now statics on
Platform. I kept them on Options for now, but updated most tests to
use Platform.
R=ajohnsen@google.com , floitsch@google.com , iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//17406010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24401 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 12:56:23 +00:00
sgjesse@google.com
7ce40aa3a0
dart:io | Add File.rename
...
R=ajohnsen@google.com
BUG=
Committed: https://code.google.com/p/dart/source/detail?r=24029
Review URL: https://codereview.chromium.org//17033003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24030 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 13:34:54 +00:00
ajohnsen@google.com
5ce3b9ddea
Clean up dart:io exceptions.
...
- Introduce IOException.
- Remove HttpParserException.
- Merge RedirectLimitExceededException and RedirectLoopException into
RedirectException.
- Remove 'IO' from FileIOException, DirectoryIOException, LinkIOException
and SocketIOException.
BUG=https://code.google.com/p/dart/issues/detail?id=9955
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//16123036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23848 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 13:15:46 +00:00
sgjesse@google.com
7841206de5
Change File.directory to not do any IO
...
Removed the File.directory and File.directorySync methods and added a
File.directory getter. The File.directory getter does not do any IO,
but just calculates the directory of the file from the path.
R=whesse@google.com
BUG=http://dartbug.com/9926
Review URL: https://codereview.chromium.org//15832003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23349 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 12:38:27 +00:00
sgjesse@google.com
a5b331161a
Fix broken test
...
Turned out that UnmodifiableListMixin was not public.
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org//14052010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21947 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 13:13:23 +00:00