Commit graph

15 commits

Author SHA1 Message Date
Blair Noctis
2d287b9b1c
Overall reorganization (#265)
* refactor!: overall reorganization

* fmt: tab to spaces

* feat: split out funcs for better error collection

* feat: replace Vec-varianted Source with Vec<Source>

* docs: more generic description for Error::InvalidPath

* fmt: reduce signature verbosity

* internal: decolorize to prepare for proper colorization

* fmt: tab to spaces (again)

* refactor: break up App into main.rs, rm utils.rs

* test: only run cli::in_place_following_symlink on Unix, symlinks are privileged on Windows

* test: update insta snapshots due to Replacer::new()? in main()

* fix: restructure logic, Windows requires closing mmap before write

* test: properly mark no-Windows test

* test: properly mark temp. ignored test

* fix: retain unsafe property of Mmap::map in separate function

* chore: `cargo fmt`

* chore: Resolve lone warning

* test: Test a variety of fs failure cases

* refactor: Add back `try_main()`

* refactor: Rework error handling

* test: Update snapshots

* test: fix path inconsistency

---------

Co-authored-by: Cosmic Horror <CosmicHorrorDev@pm.me>
2023-11-18 14:04:31 -06:00
CosmicHorror
345497a64a
Make modified text blue instead of green (#269) 2023-11-02 20:31:21 -05:00
CosmicHorror
4f77cfe1b8
Rework the replacements flag (#267)
* Add replacements tests

* Honor `-n` when using `--preview`

* Rework CLI for replacements flag

* Remove dead code

* Remove lingering TODO
2023-11-02 19:05:55 -05:00
CosmicHorror
a88673b18e
Error on $<num><non_num> capture replacement names (#258)
* Mostly working capture name validation

* Improve inputs for property tests

* Fix advancing when passing over escaped dollar signs

* Switch to inline snapshot captures

* Cleanup invalid capture error formatting code
2023-10-28 15:13:54 -05:00
CosmicHorror
c4a50a2b8f
Fix warnings and clippy lints (#185)
* Fix `cargo check` warnings

* Placate clippy

* Invert conditional
2023-05-10 00:22:22 -05:00
Linus789
0b11f3e84a Fix recursive preview (show file path) 2021-05-07 18:59:29 +02:00
Gregory
f0e396157b
Merge pull request #115 from SimplyDanny/follow-symlink-when-writing
Fix #94: Do not replace symlink with output file
2021-05-05 22:28:42 -04:00
Linus789
2b3b201c0a Fix test for replace_into_stdout, since color was added 2021-05-06 00:42:58 +02:00
Danny Moesch
39e8b8f4da Fix #94: Do not replace symlink with output file 2021-03-28 09:58:15 +02:00
Danny Moesch
7724332232 Ignore integration tests in cross-compiled targets
As stated [here](https://github.com/rust-embedded/cross#supported-targets)
spawning threads in tests will make them fail or they may not terminate
at all.
2021-03-19 18:36:58 +01:00
Danny Mösch
c8022e292f
Fix #68: Do not write empty content to file (#71) 2020-04-10 17:39:02 -04:00
Greg
c5cca8ce50
Attempt to fix test on windows 2019-12-17 00:19:07 -05:00
Greg
68d50a7df0
Fix failing tests 2019-12-17 00:00:15 -05:00
Greg
03a10c158a
Update and trim some deps 2019-11-18 23:12:03 -05:00
Greg
699eab6c27
Add cli testing 2019-11-17 14:28:43 -05:00