summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* test-nautilus-search-engine-tracker: Setup connection proactivelyCorey Berla2022-12-281-0/+3
| | | | | Now that the tracker miner fs connection is async we have to set it proactively or the test fails.
* test/interactive: Drop obsolete testAntónio Fernandes2022-09-016-267/+0
| | | | | | | | | | | | | | | | | Originally introduced by 469047a2a58430026d68a3b99b223b922b18b8d1 It's been disabled because it relied on gtk_main* API, which is gone in GTK4, but even after porting to GMainLoop API, it fails to work because operations invoke GApplication inhibition. In other words: I'm confident this test program has been broken for years without anyone realizing it. We already have automatic tests for copy operations. Manual testing can be done with the nautilus application itself with debug messages enabled. So, let's just drop the broken obsolete test code.
* general: Use parameter type list, even if function takes noneTimo2022-08-161-2/+2
| | | | | | | | Newer compiler versions (i.e. Clang 15) failed to compile nautilus, because the declaration did not match the function definition. See: https://reviews.llvm.org/D122895 Fixes #2378
* general: Delete no longer needed git ignoresPeter Eisenmann2022-07-171-6/+0
| | | | | | Meson builds out-of-tree, these ignored files will never get created in these directories. If they do, it indicates a build configuration error and should not be hidden.
* tag-manager: Skip tracker initialization in testsAntónio Fernandes2022-05-313-3/+3
| | | | | | | | | | Fixes test failures introduced by df78c517516cec20892f2a108df47613153ddf5b Before that commit, we used to fully initiate the tag manager only from NautilusApplication, because the tests didn't call set_cancellable(). Now that initialization is completed on construction, add a constructor which skips the part of initialization that the tests don't need.
* tag-manager: Stop getting full referencesAntónio Fernandes2022-05-303-0/+9
| | | | | | | | It's really annoying having to setup a local autocleanup variable in every function we want to use the NautilusTagManager API. Use a NautilusUndoManager-like API instead, with new() returning a reference and get() not.
* meson: Update to 0.59Maximiliano Sandoval R2022-02-281-1/+1
|
* meson: Do not use get_pkgconfig_variableMaximiliano Sandoval R2022-02-281-1/+1
| | | | It was deprecated in meson.
* general: Switch to GTK4António Fernandes2022-01-093-3/+3
| | | | | | | | | | | | | | | | The new major version of the toolkit is a requirement to fix old issues and enable future enhancements. Update symbols and adapt logic to API changes. Update and simplify UI definitions. Update local copy of places sidebar and places view. Replace dependencies with their GTK4-compatible successors. Make a minimum changes required to build and run, with known regressions to be fixed in future commits. For a detailed breakup of the changes, see the 36 commits-deep log leading to d5763facb1e5045251171ed1273dca0859f3542f. This is the main part of https://gitlab.gnome.org/GNOME/nautilus/-/issues/276
* tests/interactive: Disable buildAntónio Fernandes2021-12-311-1/+1
| | | | | | | They use gtk_main(), which is gone in GTK 4. To speedup the port disable these tests. To be reimplemented later. https://gitlab.gnome.org/GNOME/nautilus/-/issues/1993
* general: Drop uses of GtkContainer:border-widthErnestas Kulik2021-11-223-7/+3
| | | | | | In preparation for porting to GTK4. Rebased and ammeded by António Fernandes <antoniof@gnome.org>
* general: Stop using gtk_main_iteration()António Fernandes2021-11-222-2/+2
| | | | It's going away with GTK4. Use the recomended replacement.
* test: Run tests in unique directoryOndrej Holy2021-01-189-100/+154
| | | | | | | | | | The tests currently create various files and directories with generic names and manipulate with them directly in the `/tmp` directory. The tests also remove all files in `/tmp` with the generic prefixes like `move`, `copy`, etc. This can simply cause test suite failures if files with such names already exist in the `/tmp` directory. Also, the test suite can easily remove files created by other applications. Let's always create an unique directory in `/tmp` for tests to fix the mentioned problems...
* Port to Tracker 3Sam Thursfield2020-09-022-45/+144
| | | | | | | | | | | | | | | | | | | | | | | | Mostly the port is straightforward, we connect to tracker-miner-fs explicitly over D-Bus instead of the centralized tracker-store daemon we connected to previously. The search-engine-tracker test is now isolated from the user's real Tracker index using the `tracker-sandbox` script provided by Tracker, and it lets tracker-miner-fs index the test file rather than trying to synthesize the expected database contents. There are more changes in nautilus-tag-manager.c. Until now, starred file information was stored in the tracker-miner-fs database. This has some downsides, firstly the data is deleted if someone runs `tracker reset --hard`, secondly it isn't possible to do this from inside a Flatpak sandbox with Tracker 3.0. because the This commit changes the NautilusTagManager to set up a private database inside XDG_DATA_HOME/nautilus/tags. This stores the starred file information. The database is managed with Tracker, which allows us to continue using the rename-tracking that tracker-miner-fs provides. The same limitations apply as before that only files in indexed locations can be starred.
* tests: Make search tests return error codes on failureSam Thursfield2020-09-024-0/+25
| | | | | Previously the tests could appear to succeed even if the search didn't work as expected.
* dbus-manager: add and implement FileOperations2 interfaceAlberts Muktupāvels2020-04-062-2/+3
| | | | | | | | | | Add new version of FileOperations interface. This versions adds PlatformData argument to all methods. Currently supported arguments are parent-handle and timestamp. This change is necessary for proper focus handling. https://gitlab.gnome.org/GNOME/nautilus/merge_requests/504
* general: Run uncrustify scriptOndrej Holy2020-04-0510-57/+64
| | | | | There are some style issue since the last run. Let's run it again before enabling style-check CI job.
* test: As the previous commit, increase test timeoutCarlos Soriano2019-01-221-1/+1
| | | These tests take long...
* test: Increase timeout to 480Carlos Soriano2019-01-221-1/+1
| | | Those tests just take long time...
* general: Null-initialize some more auto variablesErnestas Kulik2018-12-121-2/+2
|
* tests: Increase timeoutCarlos Soriano2018-09-142-2/+2
| | | It timeouts in Debian and sometimes locally.
* tests: Make timeout biggerCarlos Soriano2018-09-122-2/+4
| | | | Some tests just require more, don't fail because they do so.
* Undo/redo, search tests, test library and moreAlexandru Fazakas2018-08-2810-766/+3247
|
* test: copy-files: Fix copy-files testAlexandru Fazakas2018-07-201-82/+82
| | | | | | | | In order for the tests to work in parallel, we need the file/directory names not to collide. This patch fixes the namy for the copy-files test, now all file-operations tests should be able to work in parallel.
* test: Add trash-or-delete testAlexandru Fazakas2018-07-202-0/+678
| | | | | This patch adds trash_or_delete synchronous alternative and a test including both of these functionalities.
* test: Add copy operations unit testAlexandru Fazakas2018-07-203-4/+786
| | | | | This patch adds both a sync alternative to the copy operations and a test for it.
* test: dir-has-files: Clean up filesAlexandru Fazakas2018-07-201-0/+4
| | | | | | | We should clean up files/directories after using them for testing. This patch deletes all create files after using them for the dir-has-files test.
* tests: Remove git conflict indicator from build fileErnestas Kulik2018-07-191-1/+0
| | | | Oops.
* tests: Use GMainLoop in search engine testErnestas Kulik2018-07-193-10/+16
| | | | This removes the need for a display.
* test: Add file-operations-move testAlexandru Fazakas2018-07-163-1/+755
| | | | | This patch includes the addition of the sync alternative to the file-operations-move function and a test for it.
* test: Remove useless macro definitionAlexandru Fazakas2018-05-181-2/+0
| | | | | This definition in the dir_has_files unit test is not used, so it should be removed.
* test: Add dir_has_files unit testAlexandru Fazakas2018-05-182-0/+87
| | | | | | | In this patch we added an unit test with 3 simple tests for the dir_has_files. https://gitlab.gnome.org/GNOME/nautilus/issues/224
* tests: directory-async: Use GMainLoopErnestas Kulik2018-05-181-4/+7
| | | | Using the GTK+ main loop doesn’t make a lot of sense in this case.
* build: Set a couple env vars when running testsErnestas Kulik2018-05-183-2/+42
| | | | | | | This will save some time/thinking when running tests manually. G_TEST_BUILDDIR and G_TEST_SRCDIR will be useful if g_test_build_filename() is ever used, since our primary build mode is outside the source directory, which would break the function.
* file: Remove link info attributeAntónio Fernandes2018-05-141-1/+0
| | | | Leftovers from NautilusLink removal.
* test: Add file-utilities unit testAlexandru Fazakas2018-04-042-0/+242
| | | | | | | | File utilities operations need to be tested thoroughly everytime we make changes to make sure they're fine to use further. This patch introduces an unit test file for the nautilus_file_selection_equal.
* general: Remove include guards in favor of pragma onceAlexandru Fazakas2018-03-191-5/+2
| | | | | | | | | | | | | | | | | | The traditional include guards are not as easy to handle and require extra thought into the names. Pragma once is an easier, more contributor friendly approach. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/294 general: Remove include guards in favor of pragma once The traditional include guards are not as easy to handle and require extra thought into the names. Pragma once is an easier, more contributor friendly approach. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/294
* build: make all tests optionalErnestas Kulik2018-03-161-1/+1
| | | | This can help cut down on link times a bit when working on things.
* general: fix old-style function declarationsErnestas Kulik2018-03-012-33/+33
| | | | | Parameterless function declarations imply indeterminate parameter count, while the implementations take no arguments.
* tests: Split between display and displaylessCarlos Soriano2018-01-0615-27/+38
| | | | | | | | Some tests require gtk_init, which requires a display and therefore cannot be part of the tests to be ran in the GitLab CI. Split those so we can pass an option to meson to only test the displayless tests for GitLab CI.
* tests: remove obsolete testErnestas Kulik2018-01-051-39/+0
| | | | | test-eel-background hasn’t been built forever and the code it tests is long gone.
* tests: update common filename prefix testErnestas Kulik2018-01-051-97/+12
| | | | | | 61ac48bdc0230eed8466b7d1a3164aae2a5e8594 changed the way the prefix is computed, thus breaking some of the tests. This commit removes irrelevant tests and updates broken cases.
* build: general cleanupsErnestas Kulik2018-01-021-24/+25
| | | | | | | | | | | | | | This commit does the following: * Canonicalize the style: * Use two-space indentations. * Un-Autotools-ify option names. * Don’t align arguments, simply increase indentation. * Don’t add a space before opening parenthesis in calls. * Remove unused variables. * Remove unused dependencies. * Remove config.h.meson. * Optimize dependencies. * Use disabler functionality for libselinux dependency, to save lines.
* general: remove desktop supportErnestas Kulik2018-01-021-1/+0
|
* file-utilities: rework common prefix computationErnestas Kulik2017-12-232-127/+0
| | | | | | | | | | | | | | | | | Currently, the process for getting the common prefix of a list of file names is a tad too greedy: 1. Find the common prefix of all the strings. 2. Strip the extension from the prefix. 3. Strip trailing punctuation. Step 2 may strip dots if there’s trailing whitespace and step 3 may strip useful punctuation (e.g. parentheses). This commit reworks the process as such: 1. Strip the extension from all the file names. 2. Find the common prefix of all the strings. 3. Trim trailing whitespace. Fixes #174.
* Revert "search-engine: fix search providers handling"Alexandru Pandelea2017-08-171-1/+3
| | | | | | This reverts commit 37693c427941d60634bad80dd7c2d0b3a8523cea. The patch was pushed by accident.
* search-engine: fix search providers handlingAlexandru Pandelea2017-08-151-3/+1
| | | | | | | | | | | | When starting the search providers, some provider might finish before all providers are started, so a wrong value of providers_running will be used, making Nautilus crash. To fix this, keep a queue of the started providers and whenever the value of the finised/running providers is needed, check the status of each provider. https://bugzilla.gnome.org/show_bug.cgi?id=785723
* autotools: kill itErnestas Kulik2017-03-221-47/+0
| | | | | | We’re moving to Meson this cycle, so this is losing some deadweight. https://bugzilla.gnome.org/show_bug.cgi?id=780366
* tests: Fix directory extensions pointsJan Tojnar2017-02-242-0/+6
| | | | | | | | | | In 7840b533e2, `nautilus-directory-provider` extension point was added to the code paths used by the tests. When glib is asked for extensions, it assumes the extension point is registered so it segfaults. This patch registers the extension point before the tests are run. https://bugzilla.gnome.org/show_bug.cgi?id=779178
* general: add support for MesonErnestas Kulik2017-02-241-0/+31
| | | | | | | | | | | | Since it’s 2017 already, Nautilus should use a build system that doesn’t take longer to set up the build than it takes to actually build. An observed build time using Ninja of roughly one-fifth of what it took Autotools is more than reason enough to add support for Meson. Along with that, this commit adds a convenience script to generate a tarball for releases, since we use libgd as a submodule and Meson does not handle source distributions. https://bugzilla.gnome.org/show_bug.cgi?id=778167