Daniel Davidson
2016-01-01 20:53:05 UTC
I've been using test package for a while and I run tests on drone by
invoking the scripts directly.
Some of my tests need to write files into the current directory and then
clean them up.
This line:
String root = dirname(dirname(absolute(Platform.script.toFilePath())));
gets the path of the root of the package. This fails when run via pub.
It seems the Platform.script.toFilePath() does not really resolve to a path
when run using pub test, but works fine when running test script with dart.
What is the workaourd?
Thanks
Dan
invoking the scripts directly.
Some of my tests need to write files into the current directory and then
clean them up.
This line:
String root = dirname(dirname(absolute(Platform.script.toFilePath())));
gets the path of the root of the package. This fails when run via pub.
It seems the Platform.script.toFilePath() does not really resolve to a path
when run using pub test, but works fine when running test script with dart.
What is the workaourd?
Thanks
Dan
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.