From c5258f9b51f605e9355bdf80b77714aa8f56b168 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Thu, 31 Dec 2015 22:45:36 +0100 Subject: [PATCH] Add dump test. --- Makefile.am | 4 +- doc/test_xr.txt | 234 +++++++++++++++++++++++++++++++++++++++++++ test/xr_dump_test.sh | 12 +++ 3 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 doc/test_xr.txt create mode 100755 test/xr_dump_test.sh diff --git a/Makefile.am b/Makefile.am index 037b0058..24c40687 100644 --- a/Makefile.am +++ b/Makefile.am @@ -188,8 +188,10 @@ test-x: ${bin_PROGRAMS} $(top_srcdir)/test/run_test.sh 209 $(top_srcdir)/test/run_dmenu_issue_292.sh $(top_builddir) echo "Test screenshot" $(top_srcdir)/test/run_test.sh 210 $(top_srcdir)/test/run_screenshot_test.sh $(top_builddir) - echo "Test damon" + echo "Test daemon" $(top_srcdir)/test/run_test.sh 211 $(top_srcdir)/test/run_daemon_test.sh $(top_builddir) + echo "Test xr dump" + $(top_srcdir)/test/run_test.sh 212 $(top_srcdir)/test/xr_dump_test.sh $(top_builddir) echo "End tests" diff --git a/doc/test_xr.txt b/doc/test_xr.txt new file mode 100644 index 00000000..d73e82cb --- /dev/null +++ b/doc/test_xr.txt @@ -0,0 +1,234 @@ +! Enabled modi +rofi.modi: combi,drun +! Window opacity +rofi.opacity: 100 +! Window width +rofi.width: 50 +! Number of lines +rofi.lines: 8 +! Number of columns +rofi.columns: 1 +! Font to use +rofi.font: Source Code Pro Medium 10 +! Foreground color +rofi.fg: #839496 +! Background color +rofi.bg: #002b36 +! Foreground color for active row +rofi.fg-active: #268BD2 +! Foreground color for urgent row +rofi.fg-urgent: #DC322F +! Foreground color for highlighted active row +rofi.hlfg-active: #FDF6E3 +! Foreground color for highlighted urgent row +rofi.hlfg-urgent: #FDF6E3 +! Background color for active row +rofi.bg-active: #FDF6E3 +! Background color for urgent row +rofi.bg-urgent: #FDF6E3 +! Background color for highlighted active row +rofi.hlbg-active: #268BD2 +! Background color for highlighted urgent row +rofi.hlbg-urgent: #DC322F +! Background color for alternating row +rofi.bgalt: #002b36 +! Foreground color for highlighted row +rofi.hlfg: #EEE8D5 +! Background color for highlighted row +rofi.hlbg: #586E75 +! Border color +rofi.bc: #002B36 +! Use extended color scheme +rofi.color-enabled: true +! Color scheme for normal row +rofi.color-normal: argb:0000000, #a2b5df, argb:3affffff, #a2b5df, #02143f +! Color scheme for urgent row +rofi.color-urgent: argb:0000000, #ff817f, argb:3affffff, #ff817f, #02143f +! Color scheme for active row +rofi.color-active: argb:0000000, #6aa4ff, argb:3affffff, #6aa4ff, #02143f +! Color scheme window +rofi.color-window: argb:ee02143f, #a2b5df, #a2b5df +! Border width +rofi.bw: 2 +! Location on screen +rofi.location: 2 +! Padding +rofi.padding: 2 +! Y-offset relative to location +rofi.yoffset: -2 +! X-offset relative to location +rofi.xoffset: 0 +! Always show number of lines +rofi.fixed-num-lines: true +! Terminal to use +rofi.terminal: sakura +! Ssh client to use +rofi.ssh-client: ssh +! Ssh command to execute +rofi.ssh-command: {terminal} -e {ssh-client} {host} +! Run command to execute +rofi.run-command: bash -c "{cmd}" +! Command to get extra run targets +rofi.run-list-command: +! Run command to execute that runs in shell +rofi.run-shell-command: {terminal} -e {cmd} +! Disable history in run/ssh +rofi.disable-history: false +! Use levenshtein sorting +rofi.levenshtein-sort: false +! Set case-sensitivity +rofi.case-sensitive: false +! Enable sidebar-mode +rofi.sidebar-mode: false +! Set lazy filter limit +rofi.lazy-filter-limit: 800000 +! Row height (in chars) +rofi.eh: 1 +! Enable auto select mode +rofi.auto-select: false +! Parse hosts file for ssh mode +rofi.parse-hosts: false +! Parse known_hosts file for ssh mode +rofi.parse-known-hosts: true +! Set the modi to combine in combi mode +rofi.combi-modi: window,drun,run,ssh +! Do a more fuzzy matching +rofi.fuzzy: false +! Use glob matching +rofi.glob: false +! Use regex matching +rofi.regex: false +! Tokenize input string +rofi.tokenize: true +! Monitor id to show on +rofi.m: -1 +! Margin between rows +rofi.line-margin: 3 +! Pre-set filter +rofi.filter: +! Separator style (none, dash, solid) +rofi.separator-style: solid +! Hide scroll-bar +rofi.hide-scrollbar: false +! Show markup +rofi.markup-rows: false +! Fullscreen +rofi.fullscreen: false +! Fake transparency +rofi.fake-transparency: false +! DPI +rofi.dpi: 101 +! Threads to use for string matching +rofi.threads: 8 +! Scrollbar width +rofi.scrollbar-width: 8 +! Pidfile location +rofi.pid: /tmp/1000-runtime-dir/rofi.pid +! Keybinding +rofi.kb-primary-paste: Control+Shift+v,Shift+Insert +! Keybinding +rofi.kb-secondary-paste: Control+v,Insert +! Keybinding +rofi.kb-clear-line: Control+u +! Keybinding +rofi.kb-move-front: Control+a +! Keybinding +rofi.kb-move-end: Control+e +! Keybinding +rofi.kb-move-word-back: Alt+b +! Keybinding +rofi.kb-move-word-forward: Alt+f +! Keybinding +rofi.kb-move-char-back: Left,Control+b +! Keybinding +rofi.kb-move-char-forward: Right,Control+f +! Keybinding +rofi.kb-remove-word-back: Control+Alt+h +! Keybinding +rofi.kb-remove-word-forward: Control+Alt+d +! Keybinding +rofi.kb-remove-char-forward: Delete,Control+d +! Keybinding +rofi.kb-remove-char-back: BackSpace,Control+h +! Keybinding +rofi.kb-accept-entry: Control+j,Control+m,Return,KP_Enter +! Keybinding +rofi.kb-accept-custom: Control+Return +! Keybinding +rofi.kb-accept-entry-continue: Shift+Return +! Keybinding +rofi.kb-mode-next: Shift+Right,Control+Tab +! Keybinding +rofi.kb-mode-previous: Shift+Left,Control+Shift+Tab +! Keybinding +rofi.kb-toggle-case-sensitivity: grave,dead_grave +! Keybinding +rofi.kb-delete-entry: Shift+Delete +! Keybinding +rofi.kb-row-left: Control+Page_Up +! Keybinding +rofi.kb-row-right: Control+Page_Down +! Keybinding +rofi.kb-row-up: Up,Control+p,Shift+Tab +! Keybinding +rofi.kb-row-down: Down,Control+n +! Keybinding +rofi.kb-row-tab: Tab +! Keybinding +rofi.kb-page-prev: Page_Up +! Keybinding +rofi.kb-page-next: Page_Down +! Keybinding +rofi.kb-row-first: Home,KP_Home +! Keybinding +rofi.kb-row-last: End,KP_End +! Keybinding +rofi.kb-row-select: Control+space +! Keybinding +rofi.kb-cancel: Escape,Control+bracketleft +! Keybinding +rofi.kb-custom-1: Alt+1 +! Keybinding +rofi.kb-custom-2: Alt+2 +! Keybinding +rofi.kb-custom-3: Alt+3 +! Keybinding +rofi.kb-custom-4: Alt+4 +! Keybinding +rofi.kb-custom-5: Alt+5 +! Keybinding +rofi.kb-custom-6: Alt+6 +! Keybinding +rofi.kb-custom-7: Alt+7 +! Keybinding +rofi.kb-custom-8: Alt+8 +! Keybinding +rofi.kb-custom-9: Alt+9 +! Keybinding +rofi.kb-custom-10: Alt+0 +! Keybinding +rofi.kb-custom-11: Alt+Shift+1 +! Keybinding +rofi.kb-custom-12: Alt+Shift+2 +! Keybinding +rofi.kb-custom-13: Alt+Shift+3 +! Keybinding +rofi.kb-custom-14: Alt+Shift+4 +! Keybinding +rofi.kb-custom-15: Alt+Shift+5 +! Keybinding +rofi.kb-custom-16: Alt+Shift+6 +! Keybinding +rofi.kb-custom-18: Alt+Shift+8 +! Keybinding +rofi.kb-custom-17: Alt+Shift+7 +! Keybinding +rofi.kb-custom-19: Alt+Shift+9 +! Keybinding +rofi.kb-screenshot: Alt+Shift+S +! Keybinding +rofi.kb-toggle-sort: Alt+grave +! Keybinding +rofi.key-combi: Alt-F3 +! Keybinding +rofi.key-drun: diff --git a/test/xr_dump_test.sh b/test/xr_dump_test.sh new file mode 100755 index 00000000..990a82c3 --- /dev/null +++ b/test/xr_dump_test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +xrdb -retain -load ../doc/test_xr.txt +rofi -dump-xresources > temp.txt + +if ! diff temp.txt ../doc/test_xr.txt > /dev/null +then + echo "Dump xresources does not match." + exit 1; +fi + +exit ${RETV}