Commit 88ed7b8
t0021: refactor
The `generate_random_characters()` helper function generates N
random characters in the range 'a-z' and writes them into a file. The
logic currently uses Perl, but it can be adapted rather easily by:
- Making `test-tool genrandom` generate an infinite stream.
- Using `tr -dc` to strip all characters which aren't in the range of
'a-z'.
- Using `test_copy_bytes()` to copy the first N bytes.
This allows us to drop the PERL_TEST_HELPERS prerequisite.
Signed-off-by: Patrick Steinhardt <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>generate_random_characters() to not depend on Perl1 parent cee137b commit 88ed7b8
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
619 | 618 | | |
620 | 619 | | |
621 | 620 | | |
622 | | - | |
| 621 | + | |
623 | 622 | | |
624 | 623 | | |
625 | 624 | | |
| |||
684 | 683 | | |
685 | 684 | | |
686 | 685 | | |
687 | | - | |
| 686 | + | |
688 | 687 | | |
689 | 688 | | |
690 | 689 | | |
| |||
0 commit comments