Commit Graph

127 Commits

Author SHA1 Message Date
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
Emmanuel Lepage Vallee beb997f848 tests: Test the xresource theme logo generation
As a side effect, this creates valuable SVG assets
2016-12-11 00:10:39 -05:00
Emmanuel Lepage Vallee e01de8d977 tests: Expose the themes to the examples tests 2016-12-11 00:10:39 -05:00
Uli Schlachter 9f2c4719ed Make the piechart deterministic (#1258)
Previously, the API to set the data that should be displayed was
:set_data(t) where t is a table. This table has the labels to use as its
keys and the numbers as its values. With this API, it was not possible
to influence the order in which the "pie pieces" were drawn.

This commit adds and uses a new API called :set_data_list(t). Here, t is
a table with integer keys and tables as values, thus one can iterate
over this with ipairs() and the order is well-defined. The tables used
as values contain the label as their first entry and the number as their
second entry.

Fixes: https://github.com/awesomeWM/awesome/issues/1249
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-07 20:20:09 +01:00
Uli Schlachter 5d81441c76 Make the resize_to_mouse example test deterministic (#1250)
This test has a list of "things" that should be present in the output. This
table is iterated over via pairs(), which means that the output is
non-deterministic and the order of the entries is basically random.

Fix this by using ipairs() to get a deterministic iteration order. This requires
some slight change to the table that is iterated over.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-02 21:23:36 +01:00
Uli Schlachter cb61c1884f Remove a case where a pointer appeared in text tests (#1251)
This printed a table. This will make Lua print the address of the table and
hence the output of this test was non-deterministic.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-02 20:30:10 +01:00
Daniel Hahler aeab2a70e9 Fix whitespace warnings reported by luacheck (#1229) 2016-11-21 22:38:23 +01:00
Uli Schlachter 3ba07d77a6 Fix three typos
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-10-30 15:17:27 +01:00
Emmanuel Lepage Vallee 072ff10cf0 tests: Test the slider widget. 2016-10-12 02:24:47 -04:00
Daniel Hahler 86bc579649 Improve messages with tests/examples/CMakeLists.txt 2016-10-01 17:24:44 +02:00
Daniel Hahler 84e7875e50 minor: fix doc for tests/examples/CMakeLists.txt 2016-10-01 17:24:03 +02:00
Uli Schlachter f9775b91de shims: Add support the new .data property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-09-30 11:11:55 +02:00
Emmanuel Lepage Vallee f25621c94c tests: Test the graph shape. 2016-09-26 01:20:57 -04:00
Emmanuel Lepage Vallee 549d68dcc5 doc: Add more progressbar shape examples 2016-09-26 01:18:09 -04:00
Emmanuel Lepage Vallee 7b11f1c1b4 tests: Test progressbat paddings, margins and clip 2016-09-26 01:18:09 -04:00
Emmanuel Lepage Vallee a8568eb969 doc: Add examples for vertical and labelled progressbar 2016-09-26 01:18:09 -04:00
Emmanuel Lepage Vallee b49b859fac tests: Use the new progressbar features in the default test. 2016-09-26 01:18:09 -04:00
Emmanuel Lepage Vallee 6990cc15dc tests: Add an helper "before and after" method for the layouts
This will avoid a lot of copy paste as the
remove/set/swap/insert/add/remove_widgets/swap_widgets code
is identical beside the method name.
2016-09-26 00:40:20 -04:00
Emmanuel Lepage Vallee 50b6c82091 shim: Add basic button support 2016-09-25 22:47:35 -04:00
Emmanuel Lepage Vallee de3a8bb5fb tests: Test the arc chart container. 2016-09-24 14:45:09 -04:00
Emmanuel Lepage Vallee 15102c1fe9 tests: Test the arc shape. 2016-09-24 14:45:09 -04:00