flutter/packages/flutter_tools/test/commands.shard/permeable
Matan Lurey 03749051e8
Always escape when writing pubspec.yaml's 'description' field. (#130096)
Closes https://github.com/flutter/flutter/issues/80013.

**Before**:

```
$ flutter create test1 --description "a: b"
Creating project test1...
Error detected in pubspec.yaml:
Error on line 2, column 15: Mapping values are not allowed here. Did you miss a colon earlier?
  ╷
2 │ description: a: b
  │               ^
  ╵
Please correct the pubspec.yaml file at /Users/matan/Developer/scratch/test1/pubspec.yaml
```

**After**:

```
$ flutter create test1 --description "a: b"
Creating project test1...
Resolving dependencies in test1... 
Got dependencies in test1.
Wrote 129 files.

All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev

In order to run your application, type:

  $ cd test1
  $ flutter run

Your application code is in test1/lib/main.dart.
```

---

It's worth noting that this _always_ escapes a non-empty project description, which means that descriptions that were not previously wrapped in `"`s' will be. I'm not sure how worth it is to do a _conditional_ escape (i.e. only escape if not escaping would cause a problem), but willing to change.

Side-note: I had no idea where to list this test in the (very large) `create_test.dart`, so I did my best :)
2023-07-13 22:53:51 +00:00
..
data Integrate package:flutter_lints into templates (#81417) 2021-05-10 16:19:04 -07:00
build_aar_test.dart Revert "[flutter_tools] Remove sound null safety flag (#123031)" (#123280) 2023-03-22 22:53:49 +00:00
build_apk_test.dart Reland "[tool] Move Java functions to their own file" (#126577) 2023-05-20 06:29:21 +00:00
build_appbundle_test.dart Reland "[tool] Move Java functions to their own file" (#126577) 2023-05-20 06:29:21 +00:00
build_bundle_test.dart Add .env file support for option --dart-define-from-file (#128668) 2023-07-05 16:35:08 +00:00
create_test.dart Always escape when writing pubspec.yaml's 'description' field. (#130096) 2023-07-13 22:53:51 +00:00
devices_test.dart Separate attached and wireless devices (#122615) 2023-03-15 16:35:05 +00:00
packages_test.dart [flutter_tools] replace --no-analytics with --suppress-analytics (#123133) 2023-03-21 19:18:57 +00:00
script_test.dart Null safety migration of packages/flutter_tools/test/commands.shard/permeable (#110710) 2022-09-06 10:22:09 -07:00
upgrade_test.dart Fix an ordering dependency in the flutter_tools upgrade test (#129131) 2023-06-19 11:18:16 -07:00