test(docs-infra): change URL separator from \t to --> in URLS_TO_REDIRECT.txt (#41680)

Previously, the `URLS_TO_REDIRECT.txt` file was expected to separate
URLs by a `\t` character. This could easily been mistaken for a regular
space and would often result in test errors when updating the file.

This commit updates the `URLS_TO_REDIRECT.txt` file and the
corresponding test helpers to use `-->` (potentially surrounded by
whitespace) as a separator for the URLs. This also gives a hint about
the "from" --> "to" relationship of the redirect URL pair.

PR Close #41680
This commit is contained in:
George Kalpakas
2021-04-19 08:26:02 -07:00
committed by Andrew Kushnir
parent e0bbada214
commit 335ec2ef80
2 changed files with 198 additions and 198 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -44,7 +44,7 @@ export function loadLegacyUrls() {
const urls = readFileSync(pathToLegacyUrls, 'utf8')
.split('\n')
.filter(line => line.trim() !== '')
.map(line => line.split('\t'));
.map(line => line.split(/\s*-->\s*/));
return urls;
}