Repository navigation
Match add_repl values only as whole alphanumeric runs #7949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Cloud = false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| job [SHORT_ID], commit 33939489e027, number 3390 | ||
| job_[SHORT_ID] deploy-[SHORT_ID] /[SHORT_ID]/ [SHORT_ID],[SHORT_ID] | ||
|
|
||
| >>> diff.py a.txt b.txt | ||
| diff done |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| job_id=339 | ||
| add_repl "$job_id" SHORT_ID | ||
|
|
||
| # The ID is replaced as a whole token only, not inside the hex string or the longer number. | ||
| echo "job $job_id, commit 33939489e027, number 3390" | ||
| echo "job_$job_id deploy-$job_id /$job_id/ $job_id,$job_id" | ||
|
|
||
| # diff.py applies the same replacements in Python. The files are equal only if the ID is | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nice to have] This check passes even if |
||
| # not replaced inside the commit hash. | ||
| echo "job 339 commit 33939489e027" > a.txt | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] |
||
| echo "job [SHORT_ID] commit 33939489e027" > b.txt | ||
| trace diff.py a.txt b.txt | ||
| rm a.txt b.txt | ||
| echo "diff done" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit]
acceptance/selftest/add_repl/already testsadd_replreplacement of a job ID..agents/rules/testing.mdasks to extend the existing acceptance directory when coverage overlaps. Could these whole-word cases go there instead of a newadd_repl_word/?