Commit Graph

8868 Commits

Author SHA1 Message Date
Daniel Hahler ef04fa688e tests/themes/run.sh: use themes from source dir (#1994)
This makes it easier to track their coverage.
2017-08-16 13:27:49 +02:00
Uli Schlachter a222e5c0af spawn: Fix some comments and messages
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 13:23:19 +02:00
Uli Schlachter 9f8ff76079 awesome.spawn: Add a new argument for env
This adds a new argument to awesome.spawn that can be used to specify
the environment of the spawned process.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 13:23:19 +02:00
Uli Schlachter aac519b946 Refactor spawn.c
This moves some code of parse_command() out into a new helper function.
No functional changes intended.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 13:23:19 +02:00
Uli Schlachter cc0871498c Make awesome.spawn() live up to its documentation
This function is documented to return "an error string if an error
occurred". However, the function actually threw a Lua error instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 13:23:19 +02:00
Uli Schlachter 2b6350009e Fix a typo in spawn.c
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 13:23:19 +02:00
Daniel Hahler cdaf0dd294 tests/run.sh: fix verbose mode (#1997)
Fixes https://github.com/awesomeWM/awesome/issues/1996.

Also improves usage information.
2017-08-16 11:27:32 +02:00
Daniel Hahler b8ad56ad81 Travis: build luarocks in /tmp also (#1995) 2017-08-16 10:57:23 +02:00
Daniel Hahler e9adb28af6 Merge pull request #1973 from blueyed/tests-error-on-warnings
Tests: check-integration: error on warnings
2017-08-15 17:59:30 +02:00
Daniel Hahler 30df31509e Travis: update luarocks: 2.3.0 => 2.4.2 (#1977) 2017-08-15 17:58:22 +02:00
Daniel Hahler 52548a2bee tests/run.sh: add -v option, replacing/using VERBOSE 2017-08-15 16:58:24 +02:00
Kevin Zander 5d0e9fd9e3 Add startswith and endswith function to gears.string, change awful.completion to use startswith over local function 2017-08-14 10:48:12 -05:00
Daniel Hahler 934ad741a7 tests: keep check-themes separate from check-integration (#1991)
Ref: https://github.com/awesomeWM/awesome/pull/1973#issuecomment-322183782
2017-08-14 17:18:46 +02:00
Nick Diego Yamane bfe58d65f1 docs: fix some typos/leftovers (#1989)
Signed-off-by: Nick Yamane <nick.diego@gmail.com>
2017-08-14 16:06:44 +02:00
Daniel Hahler f8d1e46eaa CMakeLists.txt: pass TEST_RUN_ARGS to tests/run.sh, default to -W 2017-08-14 16:00:35 +02:00
Daniel Hahler 062f9d6a15 tests/themes/run.sh: distinguish header from tests/run.sh 2017-08-14 13:42:13 +02:00
Daniel Hahler 730b706217 check-integration: fail on warnings
Those are most likely deprecation warnings, but the tests should be free
of warnings (from awesome) anyway.

The "Last main loop iteration took X seconds!" warning is filtered out.
2017-08-14 13:42:13 +02:00
Daniel Hahler e852455308 tests/run.sh: add support for -W to turn warnings into errors 2017-08-14 13:42:13 +02:00
Uli Schlachter eb7ee7072c Fix an old todo in the docs (#1981)
This new paragraph might not be great and it certainly is less
informative than what the wiki said here (it suggested to use some
library for widgets and explained how to use it). However, this new
paragraph is definitely better than the todo that was here for far too
long.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-13 22:26:07 +02:00
Daniel Hahler c33d85c195 Travis: update Lua/luajit; build in /tmp (#1985)
Building in /tmp avoids files to be looked at / searched for e.g. with
luacov.
2017-08-13 22:10:29 +02:00
Uli Schlachter 8166e2ff8b Fix the example in the tooltip docs (#1980)
Reference: https://github.com/awesomeWM/awesome/pull/1978
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-13 12:23:40 +02:00
Daniel Hahler 26f32f5ce4 tests/run.sh: cleanup: wait for process(es) to finish (#1982)
Ref: https://github.com/awesomeWM/awesome/pull/1967#issuecomment-321978955
2017-08-13 11:57:59 +02:00
Emmanuel Lepage Vallée 2900ea6f01 Merge pull request #1842 from psychon/lgi-check
Port lgi-check.sh to C
2017-08-12 15:59:18 -04:00
Daniel Hahler 4f0c71c737 Merge pull request #1967 from blueyed/test-themes
Test all themes
2017-08-12 14:16:31 +02:00
Daniel Hahler 1193007d34 Travis: remove custom AWESOME_THEME
It causes different code coverage paths, and loading for all themes is
tested by now.
2017-08-11 20:02:01 +02:00
Daniel Hahler f698a17138 Add check-themes, which tests themes via tests/themes/
It relies on tests/run.sh to handle failures.
2017-08-11 20:01:37 +02:00
Daniel Hahler f36738f115 tests/run.sh: allow to provide RC_FILE and theme/icon paths 2017-08-11 20:01:37 +02:00
Daniel Hahler fbea595f60 tests/_runner.lua: write "Running step …" to stderr 2017-08-11 20:01:37 +02:00
Daniel Hahler afb81640b5 Travis: use check-integration instead of tests/run.sh (coverage builds) 2017-08-11 20:01:37 +02:00
Daniel Hahler 56ac221544 CMakeLists.txt: copy all icons to build dir 2017-08-10 21:57:59 +02:00
Daniel Hahler 68497dffc4 gears.debug.print_{warning_error}: add "awesome: " prefix (#1968)
This makes it consistent with the C functions (`_warn` and `_fatal`).
2017-08-10 14:08:32 +02:00
Daniel Hahler 31e25dc6a5 Cleanup usages/patching of awful.util.deprecate (#1966) 2017-08-10 12:18:54 +02:00
Daniel Hahler 2effc8e8df Travis: use cluacov for improved performance
Closes https://github.com/awesomeWM/awesome/pull/1964.
2017-08-10 09:57:38 +02:00
Emmanuel Lepage Vallée 3cf09b1b48 Merge pull request #1876 from FloGa/FloGa-patch-complete-directory
completion: Show command prior to directory
2017-08-09 23:01:45 -04:00
Florian Gamböck da987582a6 Check for correct ordering of completed items
The correct and consistent ordering is lexicographic. Not mtime, not
ctime, but pure lexicographic ordering.
2017-08-09 21:47:07 +02:00
Florian Gamböck 7ab57e1953 Check for not completing lone directories
Even if there is a sole directory with the name of the current
completion item, if it does not start with `./` then do not complete it!
2017-08-09 21:47:07 +02:00
Florian Gamböck 51e5381b67 Check for local directory completion
A directory in the current working directory (starting with `./`) should
be completed with a slash appended.
2017-08-09 21:47:07 +02:00
Florian Gamböck 79bdcc9ee1 Create some directories with ambiguous prefix
The chaotic order is intended. Some completion algorithms tend to sort
their results by modification time or something similar.

The "huge" number of directories is also intended. With more items the
chance is higher to hit a bug if no sorting took place.

Since Zsh just completes non-empty directories, some files have to be
created, too.
2017-08-09 21:47:07 +02:00
Florian Gamböck 8a13f1cb75 Check for command with directory in PWD
Even if there is a directory in the current working directory with the
same name as a command, the directory must not be completed.

So, if we want to complete "true" and there is a directory "true" in the
current working directory, the completion list has to be just {"true"},
not {"true", "true/"}, or anything else!
2017-08-09 21:44:55 +02:00
Florian Gamböck c296a0b91d Remove obsolete redefinition of popen
With the directory being changed via luafilesystem, there is no need to
redefine internal functions.
2017-08-09 21:44:55 +02:00
Florian Gamböck 8e2d844f60 Use luafilesystem to change directory
In some circumstances, if not every syscall was somehow redefined, the
directory was not changed correctly. With luafilesystem.chdir it is
assured that we are in the wanted directory afterwards.
2017-08-09 21:44:55 +02:00
Florian Gamböck c279dd32ce Make some directories in testing area 2017-08-09 21:44:55 +02:00
Florian Gamböck 13b3a18a75 Extend prefix for local file
Since we want some folders in the testing area, we need to be a bit more
explicit about the file completion.
2017-08-09 21:44:14 +02:00
Florian Gamböck 0bd74b4f72 Append slash on true local directories
A slash must only be added if the current completion item starts with
`./` and is actually a directory.
2017-08-09 21:20:22 +02:00
Florian Gamböck 7c677e01cc Replace os.execute with gfs function 2017-08-09 21:20:22 +02:00
Florian Gamböck e8ad3a32f5 Add string helper function
This function returns true if a string starts with a given prefix.
2017-08-09 21:20:22 +02:00
Florian Gamböck 1802a44018 Import gears.filesystem
This is needed for some future filesystem checks.
2017-08-09 21:20:22 +02:00
Florian Gamböck a68cc783c9 Add function to check file executable bit
This is just a plain copy of the file_readable function, with "read"
replaced with "execute".
2017-08-08 20:33:47 +02:00
José Romildo Malaquias 0def266c84 Add entry for menu font in theme (#1961) 2017-08-07 14:36:40 -04:00
Emmanuel Lepage Vallée 90e8b67d37 Merge pull request #1960 from psychon/fix-some-leaks
Fix some leaks
2017-08-07 14:36:08 -04:00