Fix urls to pub.dev (#253)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb3ea8a..049c246 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -174,8 +174,8 @@
* Fix a few bugs in inline code syntax.
* Ignore underscores inside words (#41).
-[test]: https://pub.dartlang.org/packages/test
-[unittest]: https://pub.dartlang.org/packages/unittest
+[test]: https://pub.dev/packages/test
+[unittest]: https://pub.dev/packages/unittest
## 0.7.2
diff --git a/benchmark/input.md b/benchmark/input.md
index 1af6a7e..4787323 100644
--- a/benchmark/input.md
+++ b/benchmark/input.md
@@ -14,8 +14,8 @@
Tests are specified using the top-level [`test()`][test] function, and test
assertions are made using [`expect()`][expect]:
-[test]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_test
-[expect]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_expect
+[test]: https://pub.dev/documentation/test_core/latest/test_core/test.html
+[expect]: https://pub.dev/documentation/test_api/latest/test_api/expect.html
```dart
import "package:test/test.dart";
@@ -67,7 +67,7 @@
Any matchers from the [`matcher`][matcher] package can be used with `expect()`
to do complex validations:
-[matcher]: http://www.dartdocs.org/documentation/matcher/latest/index.html#matcher/matcher
+[matcher]: https://pub.dev/documentation/matcher/latest/matcher/matcher-library.html
```dart
import "package:test/test.dart";
@@ -130,7 +130,7 @@
}
```
-[TestOn]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test.TestOn
+[TestOn]: https://pub.dev/documentation/test_api/latest/test_api/TestOn-class.html
The string you pass to `@TestOn` is what's called a "platform selector", and it
specifies exactly which platforms a test can run on. It can be as simple as the
@@ -240,7 +240,7 @@
`Futures`; it ensures that the test doesn't finish until the `Future` completes,
and runs a matcher against that `Future`'s value.
-[completion]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_completion
+[completion]: https://pub.dev/documentation/test_api/latest/test_api/completion.html
```dart
import "dart:async";
@@ -258,7 +258,7 @@
matchers work with both synchronous callbacks and asynchronous `Future`s. They
ensure that a particular type of exception is thrown:
-[throwsA]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_throwsA
+[throwsA]: https://pub.dev/documentation/test_api/latest/test_api/throwsA.html
```dart
import "dart:async";
@@ -295,7 +295,7 @@
}
```
-[expectAsync]: http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_expectAsync
+[expectAsync]: https://pub.dev/documentation/test_api/latest/test_api/expectAsync.html
## Running Tests with Custom HTML
diff --git a/benchmark/output.html b/benchmark/output.html
index afd437d..bae8aae 100644
--- a/benchmark/output.html
+++ b/benchmark/output.html
@@ -5,8 +5,8 @@
<h1>Real-world sample</h1>
<p>This input was taken from the test package's README to get a representative
sample of real-world markdown:</p>
-<p>Tests are specified using the top-level <a href="http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_test"><code>test()</code></a> function, and test
-assertions are made using <a href="http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_expect"><code>expect()</code></a>:</p>
+<p>Tests are specified using the top-level <a href="https://pub.dev/documentation/test_core/latest/test_core/test.html"><code>test()</code></a> function, and test
+assertions are made using <a href="https://pub.dev/documentation/test_api/latest/test_api/expect.html"><code>expect()</code></a>:</p>
<pre><code class="language-dart">import "package:test/test.dart";
void main() {
@@ -49,7 +49,7 @@
});
}
</code></pre>
-<p>Any matchers from the <a href="http://www.dartdocs.org/documentation/matcher/latest/index.html#matcher/matcher"><code>matcher</code></a> package can be used with <code>expect()</code>
+<p>Any matchers from the <a href="https://pub.dev/documentation/matcher/latest/matcher/matcher-library.html"><code>matcher</code></a> package can be used with <code>expect()</code>
to do complex validations:</p>
<pre><code class="language-dart">import "package:test/test.dart";
@@ -66,11 +66,10 @@
<h2>Running Tests</h2>
<p>A single test file can be run just using <code>pub run test:test path/to/test.dart</code>
(on Dart 1.10, this can be shortened to <code>pub run test path/to/test.dart</code>).</p>
-<p><img alt="Single file being run via pub run"" src="https://raw.githubusercontent.com/dart-lang/test/master/image/test1.gif" /></p>
+<p><img src="https://raw.githubusercontent.com/dart-lang/test/master/image/test1.gif" alt="Single file being run via pub run"" /></p>
<p>Many tests can be run at a time using <code>pub run test:test path/to/dir</code>.</p>
-<p><img alt="Directory being run via "pub run"." src="https://raw.githubusercontent.com/dart-lang/test/master/image/test2.gif" /></p>
-<p>It's also possible to run a test on the Dart VM only by invoking it using <code>dart
-path/to/test.dart</code>, but this doesn't load the full test runner and will be
+<p><img src="https://raw.githubusercontent.com/dart-lang/test/master/image/test2.gif" alt="Directory being run via "pub run"." /></p>
+<p>It's also possible to run a test on the Dart VM only by invoking it using <code>dart path/to/test.dart</code>, but this doesn't load the full test runner and will be
missing some features.</p>
<p>The test runner considers any file that ends with <code>_test.dart</code> to be a test
file. If you don't pass any paths, it will run all the test files in your
@@ -79,13 +78,12 @@
well by passing <code>pub run test:test -p chrome path/to/test.dart</code>.
<code>test</code> will take care of starting the browser and loading the tests, and all
the results will be reported on the command line just like for VM tests. In
-fact, you can even run tests on both platforms with a single command: <code>pub run
-test:test -p "chrome,vm" path/to/test.dart</code>.</p>
+fact, you can even run tests on both platforms with a single command: <code>pub run test:test -p "chrome,vm" path/to/test.dart</code>.</p>
<h3>Restricting Tests to Certain Platforms</h3>
<p>Some test files only make sense to run on particular platforms. They may use
<code>dart:html</code> or <code>dart:io</code>, they might test Windows' particular filesystem
behavior, or they might use a feature that's only available in Chrome. The
-<a href="http://www.dartdocs.org/documentation/test/latest/index.html#test/test.TestOn"><code>@TestOn</code></a> annotation makes it easy to declare exactly which platforms
+<a href="https://pub.dev/documentation/test_api/latest/test_api/TestOn-class.html"><code>@TestOn</code></a> annotation makes it easy to declare exactly which platforms
a test file should run on. Just put it at the top of your file, before any
<code>library</code> or <code>import</code> declarations:</p>
<pre><code class="language-dart">@TestOn("vm")
@@ -107,35 +105,71 @@
loading a test, each identifier is set to <code>true</code> or <code>false</code> based on the current
platform, and the test is only loaded if the platform selector returns <code>true</code>.
The operators <code>||</code>, <code>&&</code>, <code>!</code>, and <code>? :</code> all work just like they do in Dart. The
-valid identifiers are:</p><ul><li>
-<p><code>vm</code>: Whether the test is running on the command-line Dart VM.</p></li><li>
-<p><code>dartium</code>: Whether the test is running on Dartium.</p></li><li>
+valid identifiers are:</p>
+<ul>
+<li>
+<p><code>vm</code>: Whether the test is running on the command-line Dart VM.</p>
+</li>
+<li>
+<p><code>dartium</code>: Whether the test is running on Dartium.</p>
+</li>
+<li>
<p><code>content-shell</code>: Whether the test is running on the headless Dartium content
-shell.</p></li><li>
-<p><code>chrome</code>: Whether the test is running on Google Chrome.</p></li><li>
+shell.</p>
+</li>
+<li>
+<p><code>chrome</code>: Whether the test is running on Google Chrome.</p>
+</li>
+<li>
<p><code>phantomjs</code>: Whether the test is running on
-<a href="http://phantomjs.org/">PhantomJS</a>.</p></li><li>
-<p><code>firefox</code>: Whether the test is running on Mozilla Firefox.</p></li><li>
-<p><code>safari</code>: Whether the test is running on Apple Safari.</p></li><li>
-<p><code>ie</code>: Whether the test is running on Microsoft Internet Explorer.</p></li><li>
+<a href="http://phantomjs.org/">PhantomJS</a>.</p>
+</li>
+<li>
+<p><code>firefox</code>: Whether the test is running on Mozilla Firefox.</p>
+</li>
+<li>
+<p><code>safari</code>: Whether the test is running on Apple Safari.</p>
+</li>
+<li>
+<p><code>ie</code>: Whether the test is running on Microsoft Internet Explorer.</p>
+</li>
+<li>
<p><code>dart-vm</code>: Whether the test is running on the Dart VM in any context,
-including Dartium. It's identical to <code>!js</code>.</p></li><li>
-<p><code>browser</code>: Whether the test is running in any browser.</p></li><li>
+including Dartium. It's identical to <code>!js</code>.</p>
+</li>
+<li>
+<p><code>browser</code>: Whether the test is running in any browser.</p>
+</li>
+<li>
<p><code>js</code>: Whether the test has been compiled to JS. This is identical to
-<code>!dart-vm</code>.</p></li><li>
+<code>!dart-vm</code>.</p>
+</li>
+<li>
<p><code>blink</code>: Whether the test is running in a browser that uses the Blink
-rendering engine.</p></li><li>
+rendering engine.</p>
+</li>
+<li>
<p><code>windows</code>: Whether the test is running on Windows. If <code>vm</code> is false, this will
-be <code>false</code> as well.</p></li><li>
+be <code>false</code> as well.</p>
+</li>
+<li>
<p><code>mac-os</code>: Whether the test is running on Mac OS. If <code>vm</code> is false, this will
-be <code>false</code> as well.</p></li><li>
+be <code>false</code> as well.</p>
+</li>
+<li>
<p><code>linux</code>: Whether the test is running on Linux. If <code>vm</code> is false, this will be
-<code>false</code> as well.</p></li><li>
+<code>false</code> as well.</p>
+</li>
+<li>
<p><code>android</code>: Whether the test is running on Android. If <code>vm</code> is false, this will
be <code>false</code> as well, which means that this <em>won't</em> be true if the test is
-running on an Android browser.</p></li><li>
+running on an Android browser.</p>
+</li>
+<li>
<p><code>posix</code>: Whether the test is running on a POSIX operating system. This is
-equivalent to <code>!windows</code>.</p></li></ul>
+equivalent to <code>!windows</code>.</p>
+</li>
+</ul>
<p>For example, if you wanted to run a test on every browser but Chrome, you would
write <code>@TestOn("browser && !chrome")</code>.</p>
<h3>Running Tests on Dartium</h3>
@@ -144,8 +178,7 @@
automatically. On Mac OS, you can also <a href="https://github.com/dart-lang/homebrew-dart">install it using Homebrew</a>.
Otherwise, make sure there's an executable called <code>dartium</code> (on Mac OS or Linux)
or <code>dartium.exe</code> (on Windows) on your system path.</p>
-<p>Similarly, tests can be run on the headless Dartium content shell by passing <code>-p
-content-shell</code>. The content shell is installed along with Dartium when using
+<p>Similarly, tests can be run on the headless Dartium content shell by passing <code>-p content-shell</code>. The content shell is installed along with Dartium when using
Homebrew. Otherwise, you can downloaded it manually <a href="http://gsdview.appspot.com/dart-archive/channels/stable/release/latest/dartium/">from this
page</a>; if you do, make sure the executable named <code>content_shell</code>
(on Mac OS or Linux) or <code>content_shell.exe</code> (on Windows) is on your system path.</p>
@@ -166,7 +199,7 @@
}
</code></pre>
<p>There are also a number of useful functions and matchers for more advanced
-asynchrony. The <a href="http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_completion"><code>completion()</code></a> matcher can be used to test
+asynchrony. The <a href="https://pub.dev/documentation/test_api/latest/test_api/completion.html"><code>completion()</code></a> matcher can be used to test
<code>Futures</code>; it ensures that the test doesn't finish until the <code>Future</code> completes,
and runs a matcher against that <code>Future</code>'s value.</p>
<pre><code class="language-dart">import "dart:async";
@@ -179,7 +212,7 @@
});
}
</code></pre>
-<p>The <a href="http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_throwsA"><code>throwsA()</code></a> matcher and the various <code>throwsExceptionType</code>
+<p>The <a href="https://pub.dev/documentation/test_api/latest/test_api/throwsA.html"><code>throwsA()</code></a> matcher and the various <code>throwsExceptionType</code>
matchers work with both synchronous callbacks and asynchronous <code>Future</code>s. They
ensure that a particular type of exception is thrown:</p>
<pre><code class="language-dart">import "dart:async";
@@ -193,7 +226,7 @@
});
}
</code></pre>
-<p>The <a href="http://www.dartdocs.org/documentation/test/latest/index.html#test/test@id_expectAsync"><code>expectAsync()</code></a> function wraps another function and has two
+<p>The <a href="https://pub.dev/documentation/test_api/latest/test_api/expectAsync.html"><code>expectAsync()</code></a> function wraps another function and has two
jobs. First, it asserts that the wrapped function is called a certain number of
times, and will cause the test to fail if it's called too often; second, it
keeps the test from finishing until the function is called the requisite number
@@ -215,11 +248,19 @@
<h2>Running Tests with Custom HTML</h2>
<p>By default, the test runner will generate its own empty HTML file for browser
tests. However, tests that need custom HTML can create their own files. These
-files have three requirements:</p><ul><li>
-<p>They must have the same name as the test, with <code>.dart</code> replaced by <code>.html</code>.</p></li><li>
+files have three requirements:</p>
+<ul>
+<li>
+<p>They must have the same name as the test, with <code>.dart</code> replaced by <code>.html</code>.</p>
+</li>
+<li>
<p>They must contain a <code>link</code> tag with <code>rel="x-dart-test"</code> and an <code>href</code>
-attribute pointing to the test script.</p></li><li>
-<p>They must contain <code><script src="packages/test/dart.js"></script></code>.</p></li></ul>
+attribute pointing to the test script.</p>
+</li>
+<li>
+<p>They must contain <code><script src="packages/test/dart.js"></script></code>.</p>
+</li>
+</ul>
<p>For example, if you had a test called <code>custom_html_test.dart</code>, you might write
the following HTML file:</p>
<pre><code class="language-html"><!doctype html>
@@ -241,7 +282,7 @@
complaining, you can mark it as "skipped". The test or tests won't be run, and,
if you supply a reason why, that reason will be printed. In general, skipping
tests indicates that they should run but is temporarily not working. If they're
-is fundamentally incompatible with a platform, <a href="http://www.dartdocs.org/documentation/test/latest/index.html#test/test.TestOn"><code>@TestOn</code>/<code>testOn</code></a>
+is fundamentally incompatible with a platform, <a href="https://pub.dev/documentation/test_api/latest/test_api/TestOn-class.html"><code>@TestOn</code>/<code>testOn</code></a>
should be used instead.</p>
<p>To skip a test suite, put a <code>@Skip</code> annotation at the top of the file:</p>
<pre><code class="language-dart">@Skip("currently failing (see issue 1234)")
diff --git a/tool/README.md b/tool/README.md
index 83ab4a1..724ae1e 100644
--- a/tool/README.md
+++ b/tool/README.md
@@ -35,7 +35,7 @@
5. Repeat steps 2 and 3.
6. Diff the output of steps 3 and 5, and show you how to diff it yourself.
-[dartdoc]: https://pub.dartlang.org/packages/dartdoc
+[dartdoc]: https://pub.dev/packages/dartdoc
[dartdoc git repository]: https://github.com/dart-lang/dartdoc
## stats.dart