#!/root/bin/gtkmenuplus

#-------------------------------------------
configure = noicons noerrorconsoleonly endsubmenu
mTESTFILE = $0 # required
#mDIR = nest/2/3/4/5A
include = lib/common.gtkmenuplus
#-------------------------------------------

DEV_TEST=false
if=$DEV_TEST

# One test case featured in the source code.
#item = <span      mnemonic="value" something else   >this item label</span>

else

# -----
# Three test cases involving local formatting only.
# Expect: mnemonic="1" erased w/o further action.
format =
item = <span foreground="blue" background="white" size="large">PASS if the next 3 items DO NOT start with mnemonic T</span>
# -----

# ----- test case
format =
item = <span mnemonic="1">This item</span>
cmd = true

# ----- test case
format =
item = <span background="yellow" mnemonic="1">This item</span>
cmd = true

# ----- test case
format =
item = <span mnemonic="1" background="pink">This item</span>
cmd = true

# -----
# Three test cases involving mixed local/global formatting.
# Expect: mnemonic= in global formatting is applied.
format =
item = <span foreground="blue" background="white" size="large">PASS if the next three items are large, R,G,B and start with underscore T</span>
# -----

# ----- test case
# want mnemonic="1" NOT at end-of-line
format = mnemonic="1" size="large"
item = <span foreground="red">This item</span>
cmd = true

# ----- test case
# want mnemonic="1" AT end-of-line
format = mnemonic="1"
item = <span foreground="green" size="large">This item</span>
cmd = true

# ----- test case
# want mnemonic="1" AT end-of-line
format = size="large" mnemonic="1"
item = <span mnemonic="1" foreground="blue">This item</span>
cmd = true

# ----- test case
# launcher with formatting
format =
item = <span foreground="blue" background="white" size="large">PASS if the X term launcher starts with mnemonic X</span>
# -----
format = mnemonic="1"
launcher = /usr/share/applications/xterm.desktop

# ----- test case
# launchersub with formatting
# Expect: mnemonic= in global formatting is applied.
format =
item = <span foreground="blue" background="white" size="large">PASS if all launchers in Applications start with mnemonic (except a few already memoized)</span>
# -----
submenu = _Applications
format = mnemonic="1"
launchersub=/usr/share/applications
endsubmenu

endif
