Commit Graph

6312 Commits

Author SHA1 Message Date
Matthias Beyer 01db294700 Add Runtime::input_is_pipe()
We need this because we might want to check whether we can get the STDIN
handle from the runtime or not.
In some (rare) cases, the runtime "thinks" that STDIN is a stream of
IDs, but it is not. So the client can check whether stdin is a pipe
(thus, whether Runtime thinks that there's a stream of IDs) and easily
work around that by taking ::std::io::stdin() itself.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-09 15:51:09 +01:00
Matthias Beyer 7b6e5eafba Merge branch 'ui-testing' into master 2019-11-03 11:57:15 +01:00
Matthias Beyer d68797a115 Test imag-mv
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-03 11:30:33 +01:00
Matthias Beyer a8107ae6e0 Add tests for imag-category
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-03 11:30:33 +01:00
Matthias Beyer 485ad3815f Add helper function to get stderr of a command
But also get back the Assert object, which can then be used to check
whether the command succeeded or failed.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-03 11:30:33 +01:00
Matthias Beyer 0c685fde73 Add imag-tag tests
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-03 11:30:33 +01:00
Matthias Beyer f7bc7d0834 Adapt to quote-less output
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-03 11:30:33 +01:00
Matthias Beyer 00d6e78c5d Rewrite imag header version output test
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-03 11:30:33 +01:00
Matthias Beyer cf4298b9da Add call() helper
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-03 11:30:33 +01:00
Matthias Beyer a837cff382 Add tests for imag-grep
Signed-off-by: Matthias Beyer <mail@beyermatthias.deg
2019-11-03 11:30:33 +01:00
Matthias Beyer f1b5b0915b Refactor file_path and provide helper function for store path
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer a8b75ad2ba Refactor out helper function to simply get stdout of a command
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer fd2afad72a Move path calculation to helper function
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer 4cbcdc118c Add test: Check whether imag-header prints correct string when querying imag.version header
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer 4b3e2ea4cd Add test: Test whether imag-header reports header at imag.version after entry creation
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer 61a1a241c8 Add test: imag-ids reports id after it was created
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer ceabde799b Add test: check whether imag-create works as expected
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer 4c67450b0c Add test: store is empty after creation
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer eb6029537a Add test: check with imag-ids whether no entries exist after init
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer 966eb6d045 Add test: check whether imag-init creates store path
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer 409660b07b Add test: check whether default configuration is added when imag-init is called
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer 49af82cc68 Add imag-init test
* Extract function to call imag-init for a tempdir path
* Simplify setup helper functions

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer d78ab67956 Add crate for ui-tests
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 18:19:30 +01:00
Matthias Beyer d51c1e99b9 Merge branch 'more-touching' into master 2019-11-02 17:50:28 +01:00
Matthias Beyer 1f858cf4bd Merge branch 'imag-link-direction' into master 2019-11-02 17:50:08 +01:00
Matthias Beyer 8270646283 Merge branch 'convert-id-in-collection-command' into master 2019-11-02 17:49:55 +01:00
Matthias Beyer a79f902d70 imag-link: Add option for directional linking
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-11-02 12:12:05 +01:00
Matthias Beyer 69ea42dcad Merge branch 'iterator-report-touched' into master
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-27 18:44:58 +01:00
Matthias Beyer fa7e8cc6b4 Merge branch 'imag-bookmark-noexit' into master
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-27 18:44:54 +01:00
Matthias Beyer c67f0bbd4b Merge branch 'imag-calendar-noexit' into master
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-27 18:44:49 +01:00
Matthias Beyer cc8150e0a9 Add extension trait for iterator over Result<Entry>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-27 13:39:34 +01:00
Matthias Beyer 39cf75a532 Add iterator extensions for store-id touched reporting
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-27 13:39:34 +01:00
Matthias Beyer fe1885c8a9 Transform imag-calendar to not call exit() but propagate errors to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-27 11:29:47 +01:00
Matthias Beyer ee739e17fc Fix indention
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-27 10:52:18 +01:00
Matthias Beyer 641c6c7761 Transform imag-bookmark to not call exit() but propagate errors to main()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-27 10:50:30 +01:00
Matthias Beyer 18ec736503 Add id reporting in imag-grep
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:48:00 +02:00
Matthias Beyer 57a8341b9c Add id reporting in imag-edit
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:48:00 +02:00
Matthias Beyer a5d006ef66 Add id reporting in imag-category
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:48:00 +02:00
Matthias Beyer cbbbbb59b5 Add id reporting in imag-create
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:48:00 +02:00
Matthias Beyer a6effe7ef3 Add id reporting in imag-annotate
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:48:00 +02:00
Matthias Beyer 0095dda996 Add extension trait for iterator over Result<Entry>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:48:00 +02:00
Matthias Beyer f1f7abddae Add iterator extensions for store-id touched reporting
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:48:00 +02:00
Matthias Beyer d8354ce6f3 Add id-in-collection command
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:19:19 +02:00
Matthias Beyer a0c5ea1fda Convert id-in-collection command to new binary crate layout
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 20:19:10 +02:00
Matthias Beyer b6facfff6b Merge branch 'resiter-update' into master
Update the resiter dependency, so we can remove our implementation of
the `IterInnerOkOrElse` extension trait.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:17:01 +02:00
Matthias Beyer 106be5746d Revert "Add extension traits for handling Result<Option<T>, E> conversion"
This reverts commit d810b63886f4006d01bca894982bbc867616f37c.

As resiter v0.4.0 does provide this extension now, we don't need it in
the codebase anymore.
2019-10-26 18:16:37 +02:00
Matthias Beyer 434f84c80d Use resiter 0.4.0 for IterInnerOkOrElse extension 2019-10-26 18:16:37 +02:00
Matthias Beyer 0529fcc7ad Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer e880fc3358 Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00
Matthias Beyer c4e7dd482d Use resiter::IterInnerOkOrElse instead of libimagerror version
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 18:16:27 +02:00