From d78ab6795616cb131a3467141d7635f70f4face9 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 12 Oct 2019 15:42:19 +0200 Subject: [PATCH] Add crate for ui-tests Signed-off-by: Matthias Beyer --- Cargo.toml | 2 + tests/ui/Cargo.toml | 18 ++++++++ tests/ui/README.md | 13 ++++++ tests/ui/src/imag.rs | 19 ++++++++ tests/ui/src/imag_annotate.rs | 19 ++++++++ tests/ui/src/imag_bookmark.rs | 19 ++++++++ tests/ui/src/imag_calendar.rs | 19 ++++++++ tests/ui/src/imag_category.rs | 19 ++++++++ tests/ui/src/imag_contact.rs | 19 ++++++++ tests/ui/src/imag_create.rs | 19 ++++++++ tests/ui/src/imag_diagnostics.rs | 19 ++++++++ tests/ui/src/imag_diary.rs | 19 ++++++++ tests/ui/src/imag_edit.rs | 19 ++++++++ tests/ui/src/imag_git.rs | 19 ++++++++ tests/ui/src/imag_gps.rs | 19 ++++++++ tests/ui/src/imag_grep.rs | 19 ++++++++ tests/ui/src/imag_habit.rs | 19 ++++++++ tests/ui/src/imag_header.rs | 19 ++++++++ tests/ui/src/imag_id_in_collection.rs | 19 ++++++++ tests/ui/src/imag_ids.rs | 19 ++++++++ tests/ui/src/imag_init.rs | 19 ++++++++ tests/ui/src/imag_link.rs | 19 ++++++++ tests/ui/src/imag_log.rs | 19 ++++++++ tests/ui/src/imag_mail.rs | 19 ++++++++ tests/ui/src/imag_markdown.rs | 19 ++++++++ tests/ui/src/imag_mv.rs | 19 ++++++++ tests/ui/src/imag_notes.rs | 19 ++++++++ tests/ui/src/imag_ref.rs | 19 ++++++++ tests/ui/src/imag_store.rs | 19 ++++++++ tests/ui/src/imag_tag.rs | 19 ++++++++ tests/ui/src/imag_timetrack.rs | 19 ++++++++ tests/ui/src/imag_todo.rs | 19 ++++++++ tests/ui/src/imag_view.rs | 19 ++++++++ tests/ui/src/imag_wiki.rs | 19 ++++++++ tests/ui/src/lib.rs | 63 +++++++++++++++++++++++++++ 35 files changed, 685 insertions(+) create mode 100644 tests/ui/Cargo.toml create mode 100644 tests/ui/README.md create mode 100644 tests/ui/src/imag.rs create mode 100644 tests/ui/src/imag_annotate.rs create mode 100644 tests/ui/src/imag_bookmark.rs create mode 100644 tests/ui/src/imag_calendar.rs create mode 100644 tests/ui/src/imag_category.rs create mode 100644 tests/ui/src/imag_contact.rs create mode 100644 tests/ui/src/imag_create.rs create mode 100644 tests/ui/src/imag_diagnostics.rs create mode 100644 tests/ui/src/imag_diary.rs create mode 100644 tests/ui/src/imag_edit.rs create mode 100644 tests/ui/src/imag_git.rs create mode 100644 tests/ui/src/imag_gps.rs create mode 100644 tests/ui/src/imag_grep.rs create mode 100644 tests/ui/src/imag_habit.rs create mode 100644 tests/ui/src/imag_header.rs create mode 100644 tests/ui/src/imag_id_in_collection.rs create mode 100644 tests/ui/src/imag_ids.rs create mode 100644 tests/ui/src/imag_init.rs create mode 100644 tests/ui/src/imag_link.rs create mode 100644 tests/ui/src/imag_log.rs create mode 100644 tests/ui/src/imag_mail.rs create mode 100644 tests/ui/src/imag_markdown.rs create mode 100644 tests/ui/src/imag_mv.rs create mode 100644 tests/ui/src/imag_notes.rs create mode 100644 tests/ui/src/imag_ref.rs create mode 100644 tests/ui/src/imag_store.rs create mode 100644 tests/ui/src/imag_tag.rs create mode 100644 tests/ui/src/imag_timetrack.rs create mode 100644 tests/ui/src/imag_todo.rs create mode 100644 tests/ui/src/imag_view.rs create mode 100644 tests/ui/src/imag_wiki.rs create mode 100644 tests/ui/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 1e52bdaf..c0d00e03 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,4 +61,6 @@ members = [ "lib/etc/libimaginteraction", "lib/etc/libimagtimeui", "lib/etc/libimagutil", + + "tests/ui", ] diff --git a/tests/ui/Cargo.toml b/tests/ui/Cargo.toml new file mode 100644 index 00000000..d5595ca0 --- /dev/null +++ b/tests/ui/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "tests-ui" +version = "0.10.0" +authors = ["Matthias Beyer "] +edition = "2018" + +# We do not publish this crate because it contains tests which should only be +# available during development and CI runs, but there's nothing that a user of +# any imag command might need, ever. +publish = false + +[dependencies] +assert_cmd = "0.11" +assert_fs = "0.11" +duct = "0.13" +env_logger = "0.7" +log = "0.4" +predicates = "1" diff --git a/tests/ui/README.md b/tests/ui/README.md new file mode 100644 index 00000000..4cbe40ac --- /dev/null +++ b/tests/ui/README.md @@ -0,0 +1,13 @@ +# UI testing + +This crate is just a helper crate for CI runs and development. It contains +test code which tests the actual imag binaries and their user interfaces and +behaviour. + +Tests are automatically done in temporary directories. +The test setup removes these testing directories after tests have run. +To prevent this, set `IMAG_UI_TEST_PERSIST`. + +Use the normal `RUST_LOG` functionality for logging (or see the documentation +for the `env_logger` crate). + diff --git a/tests/ui/src/imag.rs b/tests/ui/src/imag.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_annotate.rs b/tests/ui/src/imag_annotate.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_annotate.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_bookmark.rs b/tests/ui/src/imag_bookmark.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_bookmark.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_calendar.rs b/tests/ui/src/imag_calendar.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_calendar.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_category.rs b/tests/ui/src/imag_category.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_category.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_contact.rs b/tests/ui/src/imag_contact.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_contact.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_create.rs b/tests/ui/src/imag_create.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_create.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_diagnostics.rs b/tests/ui/src/imag_diagnostics.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_diagnostics.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_diary.rs b/tests/ui/src/imag_diary.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_diary.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_edit.rs b/tests/ui/src/imag_edit.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_edit.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_git.rs b/tests/ui/src/imag_git.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_git.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_gps.rs b/tests/ui/src/imag_gps.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_gps.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_grep.rs b/tests/ui/src/imag_grep.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_grep.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_habit.rs b/tests/ui/src/imag_habit.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_habit.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_header.rs b/tests/ui/src/imag_header.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_header.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_id_in_collection.rs b/tests/ui/src/imag_id_in_collection.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_id_in_collection.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_ids.rs b/tests/ui/src/imag_ids.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_ids.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_init.rs b/tests/ui/src/imag_init.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_init.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_link.rs b/tests/ui/src/imag_link.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_link.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_log.rs b/tests/ui/src/imag_log.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_log.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_mail.rs b/tests/ui/src/imag_mail.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_mail.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_markdown.rs b/tests/ui/src/imag_markdown.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_markdown.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_mv.rs b/tests/ui/src/imag_mv.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_mv.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_notes.rs b/tests/ui/src/imag_notes.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_notes.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_ref.rs b/tests/ui/src/imag_ref.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_ref.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_store.rs b/tests/ui/src/imag_store.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_store.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_tag.rs b/tests/ui/src/imag_tag.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_tag.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_timetrack.rs b/tests/ui/src/imag_timetrack.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_timetrack.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_todo.rs b/tests/ui/src/imag_todo.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_todo.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_view.rs b/tests/ui/src/imag_view.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_view.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/imag_wiki.rs b/tests/ui/src/imag_wiki.rs new file mode 100644 index 00000000..987eadc5 --- /dev/null +++ b/tests/ui/src/imag_wiki.rs @@ -0,0 +1,19 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 Matthias Beyer and contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + diff --git a/tests/ui/src/lib.rs b/tests/ui/src/lib.rs new file mode 100644 index 00000000..3fffb1f8 --- /dev/null +++ b/tests/ui/src/lib.rs @@ -0,0 +1,63 @@ +// +// imag - the personal information management suite for the commandline +// Copyright (C) 2015-2019 the imag contributors +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; version +// 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// + +extern crate assert_cmd; +extern crate assert_fs; +extern crate env_logger; +extern crate predicates; +#[macro_use] extern crate log; + +#[cfg(test)] mod imag; +#[cfg(test)] mod imag_annotate; +#[cfg(test)] mod imag_category; +#[cfg(test)] mod imag_create; +#[cfg(test)] mod imag_diagnostics; +#[cfg(test)] mod imag_edit; +#[cfg(test)] mod imag_git; +#[cfg(test)] mod imag_gps; +#[cfg(test)] mod imag_grep; +#[cfg(test)] mod imag_header; +#[cfg(test)] mod imag_id_in_collection; +#[cfg(test)] mod imag_ids; +#[cfg(test)] mod imag_init; +#[cfg(test)] mod imag_link; +#[cfg(test)] mod imag_markdown; +#[cfg(test)] mod imag_mv; +#[cfg(test)] mod imag_ref; +#[cfg(test)] mod imag_store; +#[cfg(test)] mod imag_tag; +#[cfg(test)] mod imag_view; +#[cfg(test)] mod imag_bookmark; +#[cfg(test)] mod imag_calendar; +#[cfg(test)] mod imag_contact; +#[cfg(test)] mod imag_diary; +#[cfg(test)] mod imag_habit; +#[cfg(test)] mod imag_log; +#[cfg(test)] mod imag_mail; +#[cfg(test)] mod imag_notes; +#[cfg(test)] mod imag_timetrack; +#[cfg(test)] mod imag_todo; +#[cfg(test)] mod imag_wiki; + +static LOG_SYNC: std::sync::Once = std::sync::Once::new(); + +pub fn setup_logging() { + LOG_SYNC.call_once(|| { let _ = env_logger::try_init(); }); +} +