blob: e6d50e833bac40f8747f76f58f899ac91adae725 [file]
# Copyright 2026 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
"""Full test of util module."""
from __future__ import annotations
from collections.abc import Iterator
from recipe_engine import recipe_api, recipe_test_api
DEPS = [
'pigweed/roll_util',
]
def RunSteps(api: recipe_api.RecipeScriptApi):
api.roll_util.on_last_iteration(60, debug=True)
lines = [
'a',
'b',
'c',
'# ROLL: 123',
'# ROLL: 456',
'd',
'e',
]
api.roll_util.update_roll_comments(
lines=lines,
matching_line_number=5,
whitespace_prefix='',
comment_prefix='#',
)
def GenTests(api) -> Iterator[recipe_test_api.TestData]:
yield api.test('basic')