Skip to content

Commit

Permalink
adding edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mossmana committed Jan 13, 2025
1 parent c13a865 commit 22ee967
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
9 changes: 8 additions & 1 deletion tool/test/license_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -499,26 +499,33 @@ Future<void> _setupTestConfigFile() async {
final contents = '''---
# sequence of license text strings that should be matched against at the top of a file and removed. <value>, which normally represents a date, will be stored.
remove_licenses:
#0
- |-
// This is some <value> multiline license
// text that should be removed from the file.
#1
- |-
/* This is other <value> multiline license
text that should be removed from the file. */
#2
- |-
# This is more <value> multiline license
# text that should be removed from the file.
#3
- |-
// This is some multiline license text to
// remove that does not contain a stored value.
# sequence of license text strings that should be added to the top of a file. <value> will be replaced.
add_licenses:
add_licenses:
#0
- |-
// This is some <value> multiline license
// text that should be added to the file.
#1
- |-
# This is other <value> multiline license
# text that should be added to the file.
#2
- |-
// This is some multiline license text to
// add that does not contain a stored value.
Expand Down
24 changes: 23 additions & 1 deletion update_licenses.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,70 @@
---
remove_licenses:
#0
- |-
// Copyright <value> The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#1
- |-
/**
Copyright <value> The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
**/
#2
- |-
# Copyright <value> The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#3
- |-
<!--
Copyright <value> The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
#4
- |-
REM Copyright <value> The Chromium Authors. All rights reserved.
REM Use of this source code is governed by a BSD-style license that can be
REM found in the LICENSE file.
add_licenses:
#5
- |-
// Copyright <value> The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file
#6
- |-
// Copyright 2022 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file.
add_licenses:
#0
- |-
// Copyright <value> The Flutter Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
#1
- |-
/**
Copyright <value> The Flutter Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
**/
#2
- |-
# Copyright <value> The Flutter Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
#3
- |-
<!--
Copyright <value> The Flutter Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
-->
#4
- |-
REM Copyright <value> The Flutter Authors
REM Use of this source code is governed by a BSD-style license that can be
Expand Down Expand Up @@ -81,6 +101,8 @@ update_paths:
remove:
- 0
- 1
- 5
- 6
add: 0
gradle:
remove:
Expand Down

0 comments on commit 22ee967

Please sign in to comment.