Sylvestre Ledru and GitHub
b9d233f92c
mktemp: handle invalid UTF-8 in suffix gracefully ( #10818 )
2026-02-08 14:12:01 -05:00
Reuben Wong
fe454ba5ae
asserts specific to target build
2026-01-31 00:45:25 +08:00
Reuben Wong
8001be0335
failure expected on android
...
temp directory is not located at /tmp
2026-01-31 00:02:49 +08:00
Reuben Wong
2fd74a89dc
fix unescaped t char
2026-01-30 22:28:41 +08:00
Reuben Wong
27d930c1ce
fix test based on windows build
2026-01-30 18:28:59 +08:00
Reuben Wong
f6151c59de
add tests for correct creation
2026-01-30 18:07:46 +08:00
✿ Fleur de Blue and GitHub
5fd34598a0
mktemp: Fix template validation to require trailing consecutive Xs ( #10224 )
...
* fix(mktemp): Validation of consecutive X's at template end
* fix(mktemp): Updated integration tests to expect failure for templates that do not end with a sufficient X run
* mktemp: document trailing-X template parsing
* mktemp: match GNU behavior for template X run detection
Change logic to only accept templates where the run of Xs containing the final 'X' is at least 3 characters long. This fixes cases like "XXX_XX", which should error with "too few X's in template", and allows "tempXXXlate", matching GNU mktemp
* mktemp: Simplify search using rposition
2026-01-15 16:45:18 +01:00
Sylvestre Ledru
66a1fc8bbf
mktemp: options support non-ut8 too
2025-08-14 10:54:17 +02:00
Sylvestre Ledru
0706675830
Fix mktemp to handle non-UTF-8 templates
2025-08-14 10:52:24 +02:00
yuankunzhang and Daniel Hofstetter
de77fc9296
mktemp: allow empty string arguments for -p/--tmpdir options
2025-08-08 14:30:06 +02:00
Yuri Astrakhan
982805d3cd
chore: manual inline formatting
...
Minor manual cleanup - inlined many format args. This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs. Note that `&foo` in a `format!` parameter results in a 6% extra performance cost, and does not get inlined by the compiler (yet).
2025-04-08 00:23:21 -04:00
Sylvestre Ledru
a0179ea239
uutests: adjust the tests to use them
2025-03-28 21:40:31 +01:00
Sylvestre Ledru
a85539f530
Run cargo fmt on the tree
2025-03-24 21:33:12 +01:00
Sylvestre Ledru
18cb7dcf9e
Use the new function fails_with_code
...
Done with
```
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.no_stdout\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2)\n\1.no_stdout();/gs' *rs
$ sed -i -e "s|.fails()(.*).code_is(|.fails_with_code(|g" *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)[ \t]*\n[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\2);/gs' *rs
$ perl -0777 -i -pe 's/([ \t]+)\.fails\(\)(.*?)[ \t]+\.code_is\(([0-9]+)\);/\1.fails_with_code(\3)\2;/gs' *rs
...
```
2025-03-01 17:26:20 +01:00
Ben Wiederhake
f1a683d45f
mktemp+tests: remove unused spell-checker:disable
2024-04-30 18:28:20 +02:00
Sylvestre Ledru
ee198126af
mktemp: adjust the error message to match 9.5
2024-03-29 21:52:48 +01:00
Sylvestre Ledru
bfca6bf70f
Add license headers on all files
2023-08-21 10:49:27 +02:00
Terts Diepraam and Sylvestre Ledru
964b1d6e10
mktemp: fix both_tmpdir_flags_present test on windows
2023-07-18 12:46:05 +02:00
Thayne McCombs and Sylvestre Ledru
536db164bf
Fix mktemp test for windows
2023-07-18 12:46:05 +02:00
6262a3e9d9
Add tests for mktemp tmpdir flags
...
And set overrides_with for tmpdir flags.
Tests were copied from #4275
Co-authored-by: David Matos <davidmatos06@gmail.com >
2023-07-18 12:46:05 +02:00
Daniel Hofstetter
698fafad68
mktemp: prioritize TMPDIR over -p when using -t
2023-05-20 08:02:37 +02:00
Daniel Hofstetter
a01dc20c30
mktemp: remove TEST_TEMPLATE9
2023-05-19 10:42:52 +02:00
Daniel Hofstetter
5be5f85043
mktemp: simplify test_default_missing_value()
2023-05-19 10:38:04 +02:00
Sylvestre Ledru
cd189b2391
Fix mktemp -t -p ~/projects/playground foo.XXXX
2023-05-18 11:08:55 +02:00
Sylvestre Ledru
35b5fd6a40
mktemp -t foo.XXXX should create in TMPDIR
2023-05-18 11:08:55 +02:00