Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Dec 20, 2023
1 parent 57e91e9 commit e3386ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ $ dhttpd --path build/web/ # Serves app at http://localhost:8080

```console
$ dhttpd --help
-p, --port=<port> The port to listen on.
(defaults to "8080")
--path=<path> The path to serve. If not set, the current directory is used.
--host=<host> The hostname to listen on.
(defaults to "localhost")
-h, --help Displays the help.
-p, --port=<port> The port to listen on.
(defaults to "8080")
--path=<path> The path to serve. If not set, the current directory is used.
--headers=<headers> HTTP headers to apply to each response. header=value;header2=value
--host=<host> The hostname to listen on.
(defaults to "localhost")
-h, --help Displays the help.
```

[path]: https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path
13 changes: 7 additions & 6 deletions test/readme_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ Future<void> _readmeCheck(List<String> args) async {

expect(expected, r'''```console
$ dhttpd --help
-p, --port=<port> The port to listen on.
(defaults to "8080")
--path=<path> The path to serve. If not set, the current directory is used.
--host=<host> The hostname to listen on.
(defaults to "localhost")
-h, --help Displays the help.
-p, --port=<port> The port to listen on.
(defaults to "8080")
--path=<path> The path to serve. If not set, the current directory is used.
--headers=<headers> HTTP headers to apply to each response. header=value;header2=value
--host=<host> The hostname to listen on.
(defaults to "localhost")
-h, --help Displays the help.
```''');

expect(readme.readAsStringSync(), contains(expected));
Expand Down

0 comments on commit e3386ff

Please sign in to comment.