Commit Graph

147 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee f1b4850bdc tests: Test the spacing widgets 2017-11-24 19:13:59 -05:00
Emmanuel Lepage Vallee a9c06fb8c5 template: Add configurable margins to the generic layout widget 2017-11-23 23:48:00 -05:00
Emmanuel Lepage Vallee 9f6fed4e7b tests: Test the separator widget 2017-11-06 05:19:17 +01:00
Daniel Hahler d1d794ab2d tests/examples/CMakeLists.txt: remove EXAMPLE_DOC_SOURCE_FILES
The caching is not reliable, and cannot be made so easily.
2017-10-22 15:55:50 +02:00
Daniel Hahler f3baf499aa tests/examples/CMakeLists.txt: set env via LUA_COV_RUNNER only (#2072)
LUA_COV_RUNNER is used with `add_custom_command` for the command to
generate the images, and AWESOME_THEMES_PATH should be set there.

Since LUA_COV_RUNNER is used also with `execute_process` there is no
need for `set(ENV …)` anymore.
2017-10-22 15:47:53 +02:00
Emmanuel Lepage Vallee 2a506b03ae tests: Port the screen template to wibox.layout.manual
It's more flexible than raw cairo code and it's what it was
originally designed for (see #1153).
2017-10-21 19:34:04 +02:00
Emmanuel Lepage Vallee 8e87bd7c64 tests: Add some methods to the shims 2017-10-21 17:57:30 +02:00
Emmanuel Lepage Vallee 15b025ff91 tests: Add the theme path ENV variable
That way theme assets can be used by the documentation images
2017-10-21 17:50:38 +02:00
Reiner Herrmann 9d7eaf020d Use reproducible timestamp during build
During build svg images of the calendar widget are generated, which
differ based on the current date.
By honouring the environment variable SOURCE_DATE_EPOCH, which is
set by distributions during build, a deterministic date can be used
at build time while keeping the normal behaviour during runtime.

See also: https://reproducible-builds.org/specs/source-date-epoch/
2017-10-07 13:58:35 +02:00
Daniel Hahler 02f894ce0c Improve tests/examples: generate deps for output files (#1962)
This still runs all the tests in the configure phase, since the tests
report back what output file (png/svg/none) will be generated.. :/

This could be improved by having this table in CMakeLists directly, or
by having a callback into the tests that only reports back that
information.  The latter would still execute all the tests (via a Lua
process).

Adds an explicit check-examples target.
2017-08-31 21:21:19 +02:00
Daniel Hahler 8923df4a5f build: make DO_COVERAGE a CMake variable
Travis: remove CXXFLAGS (not used), LDFLAGS (typo, not used)

Closes https://github.com/awesomeWM/awesome/pull/2001.
2017-08-29 22:24:12 +02:00
Uli Schlachter d33d7d71d7 tests/examples/CMakeLists.txt: Add a project() call (#1926)
project() automatically sets the PROJECT_NAME variable. Thus, when this
CMake code is run due to being included by awesome, this commit has no
effect.

When this CMake code is run on its own, CMake will no longer check for a
C and C++ compiler.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-17 10:11:52 +02:00
Emmanuel Lepage Vallee 82d1616773 tests: Add tests for the stack layout 2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallee e49e7d6938 shims: Add a missing drawin member 2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallee 458340b4d4 doc: Add examples for the ratio layout 2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallée ef1d7d8396 Merge pull request #1647 from Elv13/free_layout
Add a manual (free floating) layout
2017-06-12 19:49:30 -04:00
getzze 15d66167f7 tests: Test the calendar widget 2017-06-12 02:58:06 -04:00
Emmanuel Lepage Vallee f2b7765355 tests: Test the `manual` layout. 2017-06-11 01:14:10 -04:00
Emmanuel Lepage Vallee 9e01c92ea2 tests: Minor changes to the wibox template. 2017-06-11 01:14:10 -04:00
Uli Schlachter 0abfed54de example tests: Switch to new API
This makes the templates used by the example tests use the new API added
in the previous commit.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Uli Schlachter b3635a0101 Make the output of the gears.object.signal example stable (#1703)
Previously it would print a table which would include the memory
location where the table was stored. Thus, this produces a different
result on every build.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-04-08 10:00:34 +02:00
Kevin Zander 45dadde0dd Move filesystem functions out of awful.util into new gears.filesystem
Update awful.util filesystem function calls to gears.filesystem function calls
Rename getdir to get_dir for consistency
2017-03-15 13:46:33 -05:00
Uli Schlachter 93b53bcf3f Add some non-helpful examples
This makes the scroll and only_on_screen widgets appear in the widget
lists. The examples are not really helpful, but Elv13 told me to add
them. Also, only_on_screen is in awful.widget, but now something in
tests/examples/wibox/container refers to it...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-03-07 11:32:17 +01:00
getzze bf2d658380 Add tests for grid layout
Update tests

Update tests

Separate spacing and padding tests

Update tests amd add imperative usage

Change fixed_size to homogeneous property

Update tests
2017-03-04 20:57:33 -05:00
Kevin Zander 7f6763fb00 Add awesome.version to globals for tests. Will always show util.deprecate output 2017-03-02 18:15:59 -06:00
morethanoneanimal 1c71260389 Replace improperly used asserts with warnings.
Add awful.spawn noop function to hooks.lua test. Previously it was nil.
2017-02-21 00:31:33 +01:00
Emmanuel Lepage Vallee 4a4864bb75 doc: Add another declarative syntax example
Better show the composite/encapsulated widgets
2017-02-12 22:19:08 +01:00
Emmanuel Lepage Vallee f448a604b7 cmake: Add a --DOC_NO_DASH option to the doc examples framework
This way it can be used in documentation pages.
2017-02-12 22:19:08 +01:00
Emmanuel Lepage Vallee 7753d830c1 tests: Test the place container. 2017-02-11 16:10:13 -05:00
Emmanuel Lepage Vallee 1a7c816182 doc: Fix the progressbar examples indentation
Correctly, this time
2017-01-27 19:28:46 -05:00
SammysHP 37f0b7e3bf prompt: Make awful.widget.prompt themeable
Adds new optional properties to the theme:
    prompt_fg
    prompt_bg
    prompt_fg_cursor
    prompt_bg_cursor
    prompt_font
2017-01-23 13:15:09 +01:00
Emmanuel Lepage Vallee a6161d1229 tests: Test the prompt highligher 2017-01-22 01:14:20 -05:00
Emmanuel Lepage Vallee 928f7b04b4 prompt: Add a key filter example 2017-01-20 01:09:30 -05:00
Emmanuel Lepage Vallee f6cce940a5 prompt: Add a Vi like prompt parser
Otherwise hooks that modify the command are not documented well
enough.
2017-01-20 01:09:29 -05:00
Emmanuel Lepage Vallee 4934697817 prompt: Add a more complete hook example 2017-01-20 01:09:29 -05:00
Emmanuel Lepage Vallee 53d32d362a prompt: Unit test the example 2017-01-20 01:09:29 -05:00
Emmanuel Lepage Vallee e8f82c332a shims: Add basic shims for the key and mouse grabbers 2017-01-20 00:22:49 -05:00
Emmanuel Lepage Vallee 5e1d2ce0ad shims: Add the string.wlen function 2017-01-20 00:22:49 -05:00
Yauhen Kirylau 316734a681 move `theme_assets` from xresources theme to `beautiful` module. (#1219) 2017-01-14 04:09:54 +01:00
Daniel Hahler eacc49243b tests/examples/CMakeLists.txt: invoke luacov with `lua` directly 2017-01-08 20:34:13 +01:00
Daniel Hahler 6aee6c2053 ci: overhaul coverage processing
- Execute the tests without compiling, and don't mess with the source
   files when coverage is enabled.
   This ensures that the coverage report lines are correct.
   This disables the doc tests, as their results would be unused.
   Hack: it still expands macros on util.lua, because of
   `util.get_themes_dir()` and `util.get_awesome_icon_dir()`, which might
   be moved later.  Ref:
   https://github.com/awesomeWM/awesome/pull/1239#discussion_r93828178.
 - ensure that BUILD_APIDOC and DO_COVERAGE are not used together
 - awesomeConfig.cmake: add DO_COVERAGE as an option
 - Travis: only install codecov with DO_COVERAGE=codecov
 - Travis: do not use set -v; use set -x with DO_COVERAGE
 - do not use trailing slashes with dirs in tests/examples/CMakeLists.txt / .luacov
 - Use latest luacov (0.12.0-1) again
   This reverts parts of 4cc6a815.
   I think it is better to fix any failure that 4cc6a815 tried to work around.
 - Travis: simplify/fix require('luacov') for functionaltests
 - tests/examples/CMakeLists.txt: resolve ../.. in SOURCE_DIR
 - tests/examples/CMakeLists.txt: add DO_COVERAGE to env
 - Cleanup/simplify .luacov: work with SOURCE_DIRECTORY alone
 - tests/run.sh: pass through / set SOURCE_DIRECTORY when running awesome
 - tests/run.sh: resolve source_dir
 - use DO_COVERAGE from env only
2017-01-08 20:34:13 +01:00
Emmanuel Lepage Vallee 6158091422 doc: Partially revert the indentation changes
This messes up the doc
2017-01-03 00:12:28 -05:00
Emmanuel Lepage Vallee 767cda5830 doc: Fix some example tests indentation
When `DOC_NO_USAGE` is set, the examples need 4 spaces as per the
markdown spec.
2017-01-03 00:10:18 -05:00
Emmanuel Lepage Vallee ad203232c4 cmake: Add an extra space to the @usage code
Otherwise commented lines look like ---- My comment
instead of -- -- My comment. This wasn't a problem before the
intentation fix commit, but it is now.
2017-01-03 00:07:57 -05:00
Uli Schlachter 7d3b7fc48a Add vim modelines to all CMake files
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 14:02:14 +01:00
Uli Schlachter 46c32d9df1 tests/example: Add vim modelines
This uses DOC_HIDE magic in the actual test code, except for the
template.lua files which do not have it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 13:59:38 +01:00
Uli Schlachter af59d52ddf Slightly change DOC_HIDE magic
The following commits will add DOC_HIDE uses that are not at the end of
the line, but the beginning. Hence, drop the requirement that it appears
at the end of the line and change the ".+" at the beginning into ".*".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 13:58:35 +01:00
Daniel Hahler 68de588f21 tests: fix indenting/style (#1303)
Basically:

> for f in **/*.lua; do vim '+set sw=4' '+norm gg=G' '+wq' "$f"; done
2016-12-27 21:39:08 +01:00
Uli Schlachter 939453cabe Fix luacheck warnings in the logo-tests
Ever since these files were added, these problems existed. I have no
idea what alt_fg is supposed to mean, but since a value of nil is
apparently ok, I just pass in nil directly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-18 18:59:58 +01:00
Uli Schlachter 226bb2cc31 Fix luacheck warnings in themes/xresources/assets.lua
These were introduced by commit 12e1bd6747.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-18 18:57:58 +01:00