From 82d1616773adf3172495b91aa9408989da3fde87 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 12 Jun 2017 02:48:34 -0400 Subject: [PATCH] tests: Add tests for the stack layout --- tests/examples/wibox/layout/stack/offset.lua | 15 +++++++++++++++ tests/examples/wibox/layout/stack/spacing.lua | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/examples/wibox/layout/stack/offset.lua create mode 100644 tests/examples/wibox/layout/stack/spacing.lua diff --git a/tests/examples/wibox/layout/stack/offset.lua b/tests/examples/wibox/layout/stack/offset.lua new file mode 100644 index 000000000..e1ef3a5ee --- /dev/null +++ b/tests/examples/wibox/layout/stack/offset.lua @@ -0,0 +1,15 @@ +local generic_widget = ... --DOC_HIDE +local wibox = require("wibox") --DOC_HIDE + +return --DOC_HIDE +wibox.widget { + generic_widget( "first" ), + generic_widget( "second" ), + generic_widget( "third" ), + horizontal_offset = 5, + vertical_offset = 5, + layout = wibox.layout.stack +} +, 200, 50 --DOC_HIDE + +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/tests/examples/wibox/layout/stack/spacing.lua b/tests/examples/wibox/layout/stack/spacing.lua new file mode 100644 index 000000000..a0a99c453 --- /dev/null +++ b/tests/examples/wibox/layout/stack/spacing.lua @@ -0,0 +1,13 @@ +local generic_widget = ... --DOC_HIDE +local wibox = require("wibox") --DOC_HIDE + +return --DOC_HIDE +wibox.widget { + generic_widget( "first" ), + generic_widget( "second" ), + generic_widget( "third" ), + spacing = 6, + layout = wibox.layout.stack +} + +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80