aboutsummaryrefslogtreecommitdiff
path: root/tests (follow)
Commit message (Collapse)AuthorAgeLines
* config: add csd.double-click-to-maximize=no|yes optionDaniel Eklöf2023-07-14-0/+2
| | | | | | | | | When enabled, double-clicking the CSD titlebar will (un)maximize the window. Defaults to ‘yes’ (since this is the old hard-coded behavior). Closes #1293
* input: add basic support for touchscreen inputCismonX2023-07-05-0/+16
| | | | Closes #517
* config: dpi-aware: remove ‘auto’ value, and default to ‘no’Daniel Eklöf2023-06-29-11/+1
| | | | | | | | | | We now default to scaling fonts using the scaling factor, not monitor DPI. The ‘auto’ value for dpi-aware has been removed. Documentation (man pages and README) have been updated to reflect the new default.
* test: config: add test for url.protocols optionDan Bungert2023-06-15-1/+45
|
* test: config: add test for main.utmp-helper optionDaniel Eklöf2023-05-22-0/+1
|
* utmp: rewrite utmp loggingDaniel Eklöf2023-05-22-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch generalizes the utmp support, to not only support libutempter, but also ulog (and in the future, even more interfaces). * Rename config option main.utempter to main.utmp-helper * Add meson option -Dutmp-backend=none|libutempter|ulog|auto * Rename meson option -Ddefault-utempter-path to -Dutmp-default-helper-path * utmp is no longer detected at compile time, but at runtime instead. Meson will configure the following pre-processor macros, based on the selected utmp backend: * UTMP_ADD - argument to pass to utmp helper when adding a record (starting foot) * UTMP_DEL - argument to pass to utmp helper when removing a record (exiting foot) * UTMP_DEL_HAVE_ARGUMENT - if defined, UTMP_DEL expects an extra argument ($WAYLAND_DISPLAY) * UTMP_DEFAULT_HELPER_PATH - path to the default utmp helper binary The documentation has been updated to mention which arguments are passed to the helper binary. Closes #1314
* test: config: call FcIni() + FcFini()Daniel Eklöf2023-03-31-0/+2
| | | | | | | | | | | | | | | | | Some of the config options we’re testing result in calls to FontConfig APIs. Without calling FcIni()+FcFini(), we leak memory: Direct leak of 768 byte(s) in 3 object(s) allocated from: #0 0x7f7e95cbfa89 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7f7e95bd1fe5 (/usr/lib/libfontconfig.so.1+0x20fe5) Indirect leak of 96 byte(s) in 3 object(s) allocated from: #0 0x7f7e95cbf411 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:77 #1 0x7f7e95bd63fd (/usr/lib/libfontconfig.so.1+0x253fd) Indirect leak of 19 byte(s) in 2 object(s) allocated from: #0 0x7f7e95c72faa in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:439 #1 0x7f7e95bd1898 in FcValueSave (/usr/lib/libfontconfig.so.1+0x20898)
* fix typosHarri Nieminen2023-03-28-5/+5
|
* config: add ‘font-size-adjustment=N[px|%]’ optionDaniel Eklöf2022-12-17-0/+1
| | | | | | | | | | | This patch adds a new config option, font-size-adjustment. It lets you configure how much the font size should be incremented/decremented when zooming in or out (ctrl-+, ctrl+-). Values can be specified in points, pixels or percent. Closes #1188
* Add support for creating utmp recordsDaniel Eklöf2022-09-23-0/+1
| | | | | | | | | | | | | | | | | This patch adds support for creating utmp records using the ‘utempter’ helper binary from the ‘libutempter’ package. * New config option ‘main.utempter’ * New meson command line option, -Ddefault-utempter-path. Defaults to auto-detecting the path. The default value of the new ‘main.utempter’ config option depends on the meson command line option ‘-Ddefault-utempter-path’. If ‘main.utempter’ is *not* set to ‘none’, foot will try to execute the utempter helper binary to create utmp records when a new terminal is instantiated. The record is removed when the terminal instance is destroyed.
* config: add setting for underline thicknessYorick Peterse2022-08-20-0/+1
| | | | | | | | This adds an "underline-thickness" setting to the "main" section, similar to the existing "underline-offset" setting. This setting is used to specify a custom height for regular (= non-cursor) underlines. Fixes #1136
* config: add colors.search-box-{no-,}matchDaniel Eklöf2022-07-28-0/+6
| | | | Closes #1112
* test: config: test colors.{jump-labels,scrollback-indicator}Daniel Eklöf2022-07-28-2/+52
|
* test: config: new test for the new ‘environment’ sectionDaniel Eklöf2022-06-13-0/+37
|
* config: add [csd].hide-when-maximized=yes|noDaniel Eklöf2022-04-16-0/+2
| | | | | | | When enabled, the CSD titlebar will be hidden when the window is maximized. Closes #1019
* config: config_free(): pass conf struct by pointer, not by-valueDaniel Eklöf2022-04-12-18/+18
|
* tests: config: initial tests for text-bindingsDaniel Eklöf2022-02-16-0/+37
|
* config: rename csd.color.close -> quitDaniel Eklöf2022-02-09-1/+1
| | | | | | | | | | | This fixes a compilation error on FreeBSD: ../../foot/render.c:2055:45: error: no member named 'epoll_shim_close' in 'struct config::(anonymous at ../../foot/config.h:254:9)' conf_color = &term->conf->csd.color.close; ~~~~~~~~~~~~~~~~~~~~~ ^ /usr/local/include/libepoll-shim/epoll-shim/detail/common.h:8:15: note: expanded from macro 'close': #define close epoll_shim_close
* config: ‘pipe’ is now optional ‘aux’ data in the key-binding structDaniel Eklöf2022-02-09-19/+21
| | | | | This allows us to add helper functions that e.g. compare bindings’ aux data in a generic way.
* config: rename enum config_key_binding_type -> key_binding_typeDaniel Eklöf2022-02-09-3/+3
|
* tests: fix typo in error messageCraig Barnes2022-02-07-1/+1
|
* meson: tests: config: add missing ‘wayland_client’ dependencyDaniel Eklöf2022-02-06-1/+1
| | | | Closes #918
* fcft: adapt to API changes in fcft-3.xDaniel Eklöf2022-02-05-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fcft no longer uses wchar_t, but plain uint32_t to represent codepoints. Since we do a fair amount of string operations in foot, it still makes sense to use something that actually _is_ a string (or character), rather than an array of uint32_t. For this reason, we switch out all wchar_t usage in foot to char32_t. We also verify, at compile-time, that char32_t used UTF-32 (which is what fcft expects). Unfortunately, there are no string functions for char32_t. To avoid having to re-implement all wcs*() functions, we add a small wrapper layer of c32*() functions. These wrapper functions take char32_t arguments, but then simply call the corresponding wcs*() function. For this to work, wcs*() must _also_ be UTF-32 compatible. We can check for the presence of the __STDC_ISO_10646__ macro. If set, wchar_t is at least 4 bytes and its internal representation is UTF-32. FreeBSD does *not* define this macro, because its internal wchar_t representation depends on the current locale. It _does_ use UTF-32 _if_ the current locale is UTF-8. Since foot enforces UTF-8, we simply need to check if __FreeBSD__ is defined. Other fcft API changes: * fcft_glyph_rasterize() -> fcft_codepoint_rasterize() * font.space_advance has been removed * ‘tags’ have been removed from fcft_grapheme_rasterize() * ‘fcft_log_init()’ removed * ‘fcft_init()’ and ‘fcft_fini()’ must be explicitly called
* test: config: tweak.grapheme-shaping can’t be set when grapheme-clustering has been disabledDaniel Eklöf2022-01-13-0/+5
|
* test: config: test ‘tweak’ sectionDaniel Eklöf2022-01-13-1/+70
|
* test: config: colors: test ‘256’ is an invalid keyDaniel Eklöf2021-12-30-0/+2
|
* test: config: test colors sectionDaniel Eklöf2021-12-29-1/+56
|
* test: config: csd: test color optionsDaniel Eklöf2021-12-29-6/+12
|
* test: config: add test_color() utility functionDaniel Eklöf2021-12-29-0/+34
|
* test: config: test csd sectionDaniel Eklöf2021-12-29-0/+37
|
* test: config: test mouse sectionDaniel Eklöf2021-12-29-0/+18
|
* test: config: test cursor sectionDaniel Eklöf2021-12-29-0/+27
|
* test: config: test URL sectionDaniel Eklöf2021-12-29-0/+24
|
* test: config: rename ‘conf_ptr’ -> ‘ptr’Daniel Eklöf2021-12-29-21/+21
|
* test: config: scrollback: test indicator-posititionDaniel Eklöf2021-12-29-1/+9
|
* test: config: main: test dpi-aware, selection-target and initial-window-modeDaniel Eklöf2021-12-29-3/+27
|
* test: config: add test_enum() utility functionDaniel Eklöf2021-12-29-0/+27
|
* test: config: fix format specifier: uint32_t needs %u, not %huDaniel Eklöf2021-12-26-1/+1
|
* test: config: test ‘scrollback’ sectionDaniel Eklöf2021-12-26-0/+20
|
* test: config: add test_double() utility functionDaniel Eklöf2021-12-26-0/+37
|
* test: config: add test_uint32() utility functionDaniel Eklöf2021-12-26-0/+37
|
* test: config: bindings: verify pipe argvDaniel Eklöf2021-12-25-3/+39
|
* test: config: test [bell].command (spawn template)Daniel Eklöf2021-12-25-2/+2
|
* test: config: test [main].notify (spawn template)Daniel Eklöf2021-12-25-1/+2
|
* test: config: add test_spawn_template() utility functionDaniel Eklöf2021-12-25-0/+42
|
* test: config: ‘bell’ sectionDaniel Eklöf2021-12-25-0/+19
|
* test: config: verify setting an empty key/mouse binding failsDaniel Eklöf2021-12-18-4/+10
|
* test: config: verify collisions with the mouse override modifiers are detectedDaniel Eklöf2021-12-11-1/+11
|
* test: config: port key/mouse binding tests to new APIDaniel Eklöf2021-12-11-217/+207
|
* test: meson: add fontconfig to ‘test-config’ binary (fixes PGO builds)Daniel Eklöf2021-12-11-1/+1
|
* test: config: mouse-bindingsDaniel Eklöf2021-12-11-4/+171
|
* test: config: key-bindingsDaniel Eklöf2021-12-11-0/+218
| | | | | | | This adds tests for all [key-bindings] options, as well as an invalid “action”. The tests also verify key combo collisions are detected correctly.
* tests: meson: link with tllistDaniel Eklöf2021-12-11-1/+1
|
* test: config: cover all basic (primitive) options in [main]Daniel Eklöf2021-12-11-14/+193
|
* test: initial external unit test suite for ‘config.c’Daniel Eklöf2021-12-11-0/+101
This patch adds a separate (external) test binary with unit tests for config.c This is achieved by having the test’s source file include config.c (yes, the C file, not the header file). This allows us to call e.g. parse_section_*() directly, without having to go through config_load() (which requires having a readable file at “path”).