diff options
author | lanius <lanius> | 2003-09-03 21:24:48 +0000 |
---|---|---|
committer | lanius <lanius> | 2003-09-03 21:24:48 +0000 |
commit | bdb6e49586babb43eae371ebc7b895e3b9887dd6 (patch) | |
tree | 80fdad59da5d7bb412ee33b9fda2dfb3f46f7889 /menu | |
parent | cd3f8b4a7987d23c9af7aa6a6b3e37b9ac2b2253 (diff) | |
download | xdg-specs-bdb6e49586babb43eae371ebc7b895e3b9887dd6.tar.xz |
more teeeeeests
Diffstat (limited to 'menu')
47 files changed, 1077 insertions, 15 deletions
diff --git a/menu/tests/data/apps.directory b/menu/tests/data/apps.directory new file mode 100644 index 0000000..8981d7a --- /dev/null +++ b/menu/tests/data/apps.directory @@ -0,0 +1,65 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Apps +Name[af]=Programme +Name[ar]=تطبيقات +Name[az]=Proqram Tə'minatları +Name[be]=Дастасаваньні +Name[bg]=Приложения +Name[br]=Arloadoù +Name[bs]=Aplikacije +Name[ca]=Aplicacions +Name[cs]=Aplikace +Name[da]=Øvrige programmer +Name[de]=Programme +Name[el]=Εφαρμογές +Name[eo]=Aplikaĵoj +Name[es]=Aplicaciones +Name[et]=Rakendused +Name[eu]=Aplikazioak +Name[fa]=برنامههای کاربردی +Name[fi]=Sovellukset +Name[fo]=Nýtsluskipanir +Name[gl]=Aplicacións +Name[he]=יישומים +Name[hr]=Programi +Name[hu]=Alkalmazások +Name[id]=Aplikasi +Name[is]=Forrit +Name[it]=Applicazioni +Name[ja]=アプリケーション +Name[ko]=응용 프로그램 +Name[lo]=ອັບພລິກເຄເຊິນ +Name[lt]=Programos +Name[lv]=Aplikācijas +Name[mk]=Апликации +Name[mt]=Applikazzjonijiet +Name[nb]=Programmer +Name[nl]=Programma's +Name[nn]=Program +Name[nso]=Ditshomiso +Name[oc]=Aplicacions +Name[pl]=Aplikacje +Name[pt]=Aplicações +Name[pt_BR]=Aplicativos +Name[ro]=Aplicaţii +Name[ru]=Приложения +Name[se]=Prográmmat +Name[sk]=Aplikácie +Name[sl]=Uporabniški programi +Name[sr]=Aplikacije +Name[ss]=Ticelo +Name[sv]=Program +Name[ta]=ÀÂýÀ¡Î¸û +Name[th]=แอพพลิเคชัน +Name[tr]=Uygulamalar +Name[uk]=Програми +Name[ven]=Apulikhesheni +Name[vi]=Chương trình +Name[wa]=Programes +Name[xh]=Izicelo +Name[zh_CN]=应用程序 +Name[zh_TW]=應用程式 +Name[zu]=Abayaleli +Icon=package_applications + diff --git a/menu/tests/data/freecell.desktop b/menu/tests/data/freecell.desktop new file mode 100644 index 0000000..da6d251 --- /dev/null +++ b/menu/tests/data/freecell.desktop @@ -0,0 +1,83 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=FreeCell +Name[be]=Вольная ячэя +Name[bg]=Свободна Клетка +Name[bn]=ফ্রীসেল +Name[ca]=FreeCell +Name[cs]=FreeCell +Name[da]=Napoleon +Name[de]=FreeCell +Name[el]=FreeCell +Name[es]=FreeCell +Name[et]=Freecell +Name[fi]=Vapaakenttä +Name[fr]=Freecell +Name[ga]=FreeCell +Name[gl]=FreeCell +Name[he]=פריסל +Name[hu]=FreeCell +Name[it]=FreeCell +Name[ja]=フリーセル +Name[ko]=프리셀 +Name[lt]=FreeCell +Name[lv]=FreeCell +Name[mn]=Фриселл +Name[ms]=FreeCell +Name[nl]=FreeCell +Name[no]=Freecell +Name[pl]=FreeCell +Name[pt]=Freecell +Name[pt_BR]=FreeCell +Name[ru]=Фриселл +Name[sk]=FreeCell +Name[sl]=FreeCell +Name[sv]=Napoleon på S:t Helena +Name[tr]=İskambil falı +Name[uk]=Вільна комірка +Name[vi]=FreeCell +Name[wa]=Freecell +Name[zh_CN]=空当接龙 +Name[zh_TW]=Freecell +Comment=FreeCell game +Comment[be]=Гульня ў Вольную ячэю +Comment[bg]=игра Свободна Клетка +Comment[bn]=ফ্রীসেল খেলা +Comment[ca]=Joc del FreeCell +Comment[cs]=Hra FreeCell +Comment[da]=Kortspillet Napoleon +Comment[de]=FreeCell-Spiel +Comment[el]=Το παιχνίδι FreeCell +Comment[es]=Juego FreeCell +Comment[et]=Kaardimäng FreeCell +Comment[fi]=Vapaakenttä-peli +Comment[fr]=Jeu de cartes Freecell +Comment[he]=משחק פריסל +Comment[hu]=FreeCell játék +Comment[it]=FreeCell +Comment[ja]=フリーセルの GNOME 版 +Comment[lv]=FreeCell spēle +Comment[mn]=GNOME Фриселл тоглоом +Comment[ms]=Permainan FreeCell +Comment[nl]=FreeCell Spel +Comment[no]=Spillet FreeCell +Comment[pl]=Gra FreeCell +Comment[pt]=Jogo FreeCell +Comment[pt_BR]=Jogo de FreeCell +Comment[ru]=Пасьянс "Ячейка" +Comment[sk]=Hra FreeCell +Comment[sl]=Igra Freecell +Comment[sv]=Spelet Napoleon på S:t Helena +Comment[tr]=İskambil falı oyunu +Comment[uk]=Гра "Вільна комірка" +Comment[vi]=Trò chơi FreeCell +Comment[zh_TW]=Freecell 紙牌接龍遊戲 +Exec=freecell +Icon=gnome-cardgame.png +Terminal=false +Type=Application +Categories=GNOME;Application;Game;CardGame; +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=gnome-games +X-GNOME-Bugzilla-Component=freecell +StartupNotify=true diff --git a/menu/tests/data/gataxx.desktop b/menu/tests/data/gataxx.desktop new file mode 100644 index 0000000..10dfec6 --- /dev/null +++ b/menu/tests/data/gataxx.desktop @@ -0,0 +1,81 @@ +[Desktop Entry] +Encoding=UTF-8 +Icon=gataxx.png +Name=Gataxx +Name[am]=Gataxx +Name[be]=Gataxx +Name[bg]=Гатаксс +Name[bn]=জীঅ্যাটাক্স +Name[ca]=Gataxx +Name[cs]=Gataxx +Name[da]=Ataxx +Name[de]=Gataxx +Name[el]=Gataxx +Name[es]=Gataxx +Name[et]=Gataxx +Name[fi]=Gataxx +Name[fr]=Gataxx +Name[he]=Gataxx +Name[hu]=Gataxx +Name[it]=Gataxx +Name[ja]=Gataxx +Name[ko]=Gataxx +Name[lv]=Gataxx +Name[mn]=Gataxx +Name[ms]=Gataxx +Name[nl]=Gataxx +Name[no]=Gataxx +Name[pl]=Gataxx +Name[pt]=Gataxx +Name[pt_BR]=Gataxx +Name[ru]=Gataxx +Name[sk]=Gataxx +Name[sl]=Gataxx +Name[sv]=Gataxx +Name[tr]=Gataxx +Name[uk]=Атаки +Name[vi]=Gataxx +Name[wa]=Gataxx +Name[zh_CN]=Gataxx +Name[zh_TW]=Gataxx +Comment=Ataxx game +Comment[be]=Гульня Ataxx +Comment[bg]=Игра атаксс +Comment[bn]=অ্যাটাক্স খেলা +Comment[ca]=Joc del Ataxx +Comment[cs]=Hra Ataxx +Comment[da]=Spillet Ataxx +Comment[de]=Ataxx-Spiel +Comment[el]=Παιχνίδι Ataxx +Comment[es]=Un juego tipo Ataxx. +Comment[et]=Mäng nimega ataxx +Comment[fi]=Ataxx-peli +Comment[fr]=Jeu Ataxx +Comment[he]=משחק Ataxx +Comment[hu]=Ataxx játék +Comment[it]=Gioco Ataxx +Comment[ja]=Ataxx ゲーム +Comment[lv]=Ataxx spēle +Comment[mn]=Ataxx тоглоом. +Comment[ms]=Permainan Ataxx +Comment[nl]=Ataxx +Comment[no]=Ataxx-spill +Comment[pl]=Gra Ataxx +Comment[pt]=Jogo Ataxx +Comment[pt_BR]=Jogo Ataxx +Comment[ru]=Игра ataxx +Comment[sk]=Hra Ataxx +Comment[sl]=Igra Ataxx +Comment[sv]=Spelet Ataxx +Comment[tr]=Ataxx oyunu +Comment[uk]=Гра "Атаки" +Comment[vi]=Trò chơi Ataxx. +Comment[zh_TW]=Ataxx 遊戲 +Exec=gataxx +Terminal=false +Type=Application +Categories=GNOME;Application;Game;BoardGame; +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=gnome-games +X-GNOME-Bugzilla-Component=gataxx +StartupNotify=true diff --git a/menu/tests/data/glines.desktop b/menu/tests/data/glines.desktop new file mode 100644 index 0000000..5e5b465 --- /dev/null +++ b/menu/tests/data/glines.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Glines +Name[be]=Glines +Name[bg]=ГЛинии +Name[bn]=জীলাইন্স +Name[ca]=Glines +Name[cs]=Glines +Name[da]=Linjer +Name[de]=Glines +Name[el]=Glines +Name[es]=Glines +Name[et]=Glines +Name[eu]=Glines +Name[fi]=Glines +Name[fr]=Glines +Name[he]=Glines +Name[hu]=Glines +Name[it]=Glines +Name[ja]=Glines +Name[ko]=Glines +Name[lt]=Glines +Name[lv]=Glines +Name[mn]=Glines +Name[ms]=Glines +Name[nl]=GLines +Name[no]=Glines +Name[pl]=Glines +Name[pt]=GLinhas +Name[pt_BR]=Glines +Name[ro]=Glines +Name[ru]=Glines +Name[sk]=GČiary +Name[sl]=Glines +Name[sv]=Glinjer +Name[tr]=Sıradaki toplar +Name[uk]=Ряди +Name[vi]=Glines +Name[wa]=GRoyes +Name[zh_CN]=Glines +Name[zh_TW]=Glines +Comment=Color lines game +Comment[be]=Гульня "Каляровыя лініі" +Comment[bg]=Игра Цветни линии +Comment[bn]=কালার লাইন্স খেলা +Comment[ca]=Joc de línies de color +Comment[cs]=Hra Barevné linie +Comment[da]=Farvede linjer-spil +Comment[de]=Farblinienspiel +Comment[el]=Παιχνίδι γραμμών χρώματος +Comment[es]=Juego del tipo líneas de colores. +Comment[fi]=Väriviivapeli +Comment[fr]=Jeu de lignes colorées +Comment[he]=משחק שורות צבעוניות +Comment[hu]=Color lines játék +Comment[it]=Gioco Color Lines +Comment[ja]=カラーラインのゲーム +Comment[lv]=Krāsu līniju spēle +Comment[mn]=Өнгөт бөмбөлөг тоглоом +Comment[ms]=Permainan garisan warna +Comment[nl]=Kleurlijnen +Comment[no]=Spill med fargelinjer +Comment[pl]=Gra w kolorowe linie +Comment[pt]=Jogo das linhas coloridas +Comment[pt_BR]=Jogo de linhas coloridas +Comment[ru]=Игра "Цветные линии" +Comment[sk]=Hra Farebné čiary +Comment[sl]=Igra barvnih črt +Comment[sv]=Färglinjespel +Comment[tr]=Color lines oyunu +Comment[uk]=Гра "Кольорові ряди" +Comment[vi]=Trò chơi ColorLines +Comment[zh_TW]=Color lines 遊戲 +Exec=glines +Icon=glines.png +Terminal=false +Type=Application +Categories=GNOME;Application;Game;PuzzleGame; +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=gnome-games +X-GNOME-Bugzilla-Component=glines +StartupNotify=true diff --git a/menu/tests/data/mahjongg.desktop b/menu/tests/data/mahjongg.desktop new file mode 100644 index 0000000..0d5f5de --- /dev/null +++ b/menu/tests/data/mahjongg.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Mahjongg +Name[am]=ማህጆንግ +Name[be]=Маджонг +Name[bg]=Махджонг +Name[bn]=মাহজং +Name[ca]=Mahjongg +Name[cs]=Mahjongg +Name[da]=Mahjongg +Name[de]=Mahjongg +Name[el]=Mahjongg +Name[es]=Mahjongg +Name[et]=Mahjongg +Name[fa]=ماهجونگ +Name[fi]=Mahjongg +Name[fr]=Mahjongg +Name[gl]=Mahjongg +Name[he]=Mahjongg +Name[hu]=Mahjongg +Name[it]=Mahjongg +Name[ja]=GNOME 上海 +Name[ko]=그놈 마작 +Name[lt]=Mahjongg +Name[lv]=Mahjongg +Name[mn]=Маджонг +Name[ms]=Mahjongg +Name[nl]=Mahjongg +Name[no]=Mahjongg +Name[pl]=Mahjongg +Name[pt]=Mahjongg +Name[pt_BR]=Mahjongg +Name[ru]=Маджонг +Name[sk]=Mahjongg +Name[sl]=Mahjongg +Name[sv]=Mah Jong +Name[tr]=Mahjongg +Name[uk]=Магджонґ +Name[vi]=Mahjongg +Name[wa]=Mahjongg +Name[zh_CN]=堆麻将 +Name[zh_TW]=上海麻將 +Comment=Mahjongg game +Comment[am]=የማህጆንግ ጨዋታ +Comment[be]=Гульня Маджонг +Comment[bg]=Игра на Махджонг +Comment[bn]=মাহজং খেলা +Comment[ca]=Joc del Mahjongg +Comment[cs]=Hra Mahjongg +Comment[da]=Mahjonggspil +Comment[de]=Mahjongg-Spiel +Comment[el]=Παιχνίδι Mahjongg +Comment[es]=Juego Mahjongg +Comment[et]=Mäng nimega mahjongg +Comment[fa]=بازی ماهجونگ +Comment[fi]=Mahjongg-peli +Comment[fr]=Jeu de Mahjongg +Comment[he]=משחק Mahjongg +Comment[hu]=Mahjongg játék +Comment[it]=Gioco Mahjongg +Comment[ja]=麻雀ゲーム +Comment[lv]=Mahjongg spēle +Comment[mn]=Mahjongg тоглоом +Comment[ms]=Permainan Mahjongg +Comment[nl]=Mahjongg +Comment[no]=Mahjongg-spill +Comment[pl]=Gra Mahjongg +Comment[pt]=Jogo Mahjongg +Comment[pt_BR]=Jogo Mahjongg +Comment[ru]=Игра Маджонг +Comment[sk]=Hra Mahjongg +Comment[sl]=Igra Mahjongg +Comment[sv]=Mah Jong-spel +Comment[tr]=Mahjongg oyunu +Comment[uk]=Гра "Магджонґ" +Comment[vi]=Trò chơi Mahjongg +Comment[zh_TW]=上海麻將遊戲 +Exec=mahjongg +Icon=gnome-mahjongg.png +Terminal=false +Type=Application +Categories=GNOME;Application;Game;BoardGame; +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=gnome-games +X-GNOME-Bugzilla-Component=mahjongg +StartupNotify=true diff --git a/menu/tests/menutest b/menu/tests/menutest index da1319e..c5eb4aa 100755 --- a/menu/tests/menutest +++ b/menu/tests/menutest @@ -24,27 +24,21 @@ fi export MENUTESTDIR -TESTS=$* - if [ "x${TESTS}" == "x" ]; then - TESTS=$(eval echo "test-*[^~]") - if [ "x${TESTS}" == "xtest-*[^~]" ]; then - echo No tests found in ${PWD} - exit 1 - fi + TESTS=`ls tests` fi - for TEST in ${TESTS}; do + echo rm -rf ${MENUTESTDIR} 2> /dev/null mkdir ${MENUTESTDIR} - RESULT=$(echo ${TEST}|sed -e 's^test-^result-^') + RESULT=tests/${TEST}/result if [ ! -e ${RESULT} ]; then - echo 'Result file ('${RESULT}') for '${TEST}' missing' + echo '!!! Result file ('${RESULT}') for '${TEST}' missing' else ( - echo Running: ${TEST} + echo ">>> Running test ${TEST}" # Some predefined values XDG_CONFIG_HOME=${MENUTESTDIR}/xdg_config_home @@ -61,21 +55,21 @@ for TEST in ${TESTS}; do export XDG_CONFIG_DIRS export XDG_DATA_DIRS - . ${TEST} + . tests/${TEST}/test $MENUTEST > ${MENUTESTDIR}/result1 2> ${MENUTESTDIR}/log ./expand ${RESULT} > ${MENUTESTDIR}/result2 ) if diff -q ${MENUTESTDIR}/result1 ${MENUTESTDIR}/result2 > /dev/null; then - echo ${TEST}' OK' + echo '>>> OK' else sort ${MENUTESTDIR}/result1 > ${MENUTESTDIR}/result1.sorted sort ${MENUTESTDIR}/result2 > ${MENUTESTDIR}/result2.sorted if diff -u ${MENUTESTDIR}/result1.sorted ${MENUTESTDIR}/result2.sorted > ${MENUTESTDIR}/result.diff; then - echo ${TEST}' OK (different order)' + echo '>>> OK (different order)' else - echo ${TEST}' Failed' + echo '>>> Failed' cat ${MENUTESTDIR}/result.diff fi fi diff --git a/menu/tests/tests/1/result b/menu/tests/tests/1/result new file mode 100644 index 0000000..73b00c9 --- /dev/null +++ b/menu/tests/tests/1/result @@ -0,0 +1,3 @@ +Editors/ KEdit.desktop ${XDG_DATA_DIR}/applications/KEdit.desktop +Editors/ kate.desktop ${XDG_DATA_DIR}/applications/kate.desktop +Editors/ kwrite.desktop ${XDG_DATA_DIR}/applications/kwrite.desktop diff --git a/menu/tests/tests/1/test b/menu/tests/tests/1/test new file mode 100644 index 0000000..160c543 --- /dev/null +++ b/menu/tests/tests/1/test @@ -0,0 +1,24 @@ +echo ">>> the <Category> tag" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>Editors</Name> + <Include> + <Category>TextEditor</Category> + </Include> + </Menu> +</Menu> +EOF + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop kate.desktop diff --git a/menu/tests/tests/2/result b/menu/tests/tests/2/result new file mode 100644 index 0000000..421ae42 --- /dev/null +++ b/menu/tests/tests/2/result @@ -0,0 +1,4 @@ +BoardGames/ gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/gataxx.desktop +BoardGames/ mahjongg.desktop /tmp/menutestdir/xdg_data_dir/applications/mahjongg.desktop +Games/ freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/freecell.desktop +Games/ glines.desktop /tmp/menutestdir/xdg_data_dir/applications/glines.desktop diff --git a/menu/tests/tests/2/test b/menu/tests/tests/2/test new file mode 100644 index 0000000..93f7bf7 --- /dev/null +++ b/menu/tests/tests/2/test @@ -0,0 +1,34 @@ +echo ">>> the <OnlyAllocated> tag" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>BoardGames</Name> + <Include> + <Category>BoardGame</Category> + </Include> + </Menu> + <Menu> + <Name>Games</Name> + <Include> + <Category>Game</Category> + </Include> + <OnlyUnallocated/> + <NotOnlyUnallocated/> + <OnlyUnallocated/> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/3/result b/menu/tests/tests/3/result new file mode 100644 index 0000000..ccb0379 --- /dev/null +++ b/menu/tests/tests/3/result @@ -0,0 +1,2 @@ +BoardGames/ gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/gataxx.desktop +BoardGames/ mahjongg.desktop /tmp/menutestdir/xdg_data_dir/applications/mahjongg.desktop diff --git a/menu/tests/tests/3/test b/menu/tests/tests/3/test new file mode 100644 index 0000000..48952f7 --- /dev/null +++ b/menu/tests/tests/3/test @@ -0,0 +1,34 @@ +echo ">>> the <Deleted> tag" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>BoardGames</Name> + <Include> + <Category>BoardGame</Category> + </Include> + </Menu> + <Menu> + <Name>Games</Name> + <Include> + <Category>Game</Category> + </Include> + <Deleted/> + <NotDeleted/> + <Deleted/> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/4/result b/menu/tests/tests/4/result new file mode 100644 index 0000000..fb635c2 --- /dev/null +++ b/menu/tests/tests/4/result @@ -0,0 +1,2 @@ +Games/ gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/gataxx.desktop +Games/ mahjongg.desktop /tmp/menutestdir/xdg_data_dir/applications/mahjongg.desktop diff --git a/menu/tests/tests/4/test b/menu/tests/tests/4/test new file mode 100644 index 0000000..e7f48aa --- /dev/null +++ b/menu/tests/tests/4/test @@ -0,0 +1,33 @@ +echo ">>> a simple <Move> operation" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + <Move> + <Old>Foo</Old> + <New>Bar</New> + <Old>BoardGames</Old> + <New>Apps</New> + <Old>BoardGames</Old> + <New>Games</New> + </Move> + + <Menu> + <Name>BoardGames</Name> + <Include> + <Category>BoardGame</Category> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/5/result b/menu/tests/tests/5/result new file mode 100644 index 0000000..df3b711 --- /dev/null +++ b/menu/tests/tests/5/result @@ -0,0 +1,4 @@ +Applications/ freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/freecell.desktop +Applications/ gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/gataxx.desktop +Applications/ glines.desktop /tmp/menutestdir/xdg_data_dir/applications/glines.desktop +Applications/ mahjongg.desktop /tmp/menutestdir/xdg_data_dir/applications/mahjongg.desktop diff --git a/menu/tests/tests/5/test b/menu/tests/tests/5/test new file mode 100644 index 0000000..25f02de --- /dev/null +++ b/menu/tests/tests/5/test @@ -0,0 +1,25 @@ +echo ">>> the <All> Keyword" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>Applications</Name> + <Include> + <All/> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/6/result b/menu/tests/tests/6/result new file mode 100644 index 0000000..7fefbe1 --- /dev/null +++ b/menu/tests/tests/6/result @@ -0,0 +1 @@ +Applications/ freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/freecell.desktop diff --git a/menu/tests/tests/6/test b/menu/tests/tests/6/test new file mode 100644 index 0000000..0b29440 --- /dev/null +++ b/menu/tests/tests/6/test @@ -0,0 +1,25 @@ +echo ">>> the <Filename> tag" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>Applications</Name> + <Include> + <Filename>freecell.desktop</Filename> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/7/result b/menu/tests/tests/7/result new file mode 100644 index 0000000..7fefbe1 --- /dev/null +++ b/menu/tests/tests/7/result @@ -0,0 +1 @@ +Applications/ freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/freecell.desktop diff --git a/menu/tests/tests/7/test b/menu/tests/tests/7/test new file mode 100644 index 0000000..3c74628 --- /dev/null +++ b/menu/tests/tests/7/test @@ -0,0 +1,28 @@ +echo ">>> the <And> Keyword" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>Applications</Name> + <Include> + <And> + <Filename>freecell.desktop</Filename> + <Category>Game</Category> + </And> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/8/result b/menu/tests/tests/8/result new file mode 100644 index 0000000..df3b711 --- /dev/null +++ b/menu/tests/tests/8/result @@ -0,0 +1,4 @@ +Applications/ freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/freecell.desktop +Applications/ gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/gataxx.desktop +Applications/ glines.desktop /tmp/menutestdir/xdg_data_dir/applications/glines.desktop +Applications/ mahjongg.desktop /tmp/menutestdir/xdg_data_dir/applications/mahjongg.desktop diff --git a/menu/tests/tests/8/test b/menu/tests/tests/8/test new file mode 100644 index 0000000..cf0731a --- /dev/null +++ b/menu/tests/tests/8/test @@ -0,0 +1,28 @@ +echo ">>> the <Or> Keyword" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>Applications</Name> + <Include> + <Or> + <Filename>freecell.desktop</Filename> + <Category>Game</Category> + </Or> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/9/result b/menu/tests/tests/9/result new file mode 100644 index 0000000..ce28f91 --- /dev/null +++ b/menu/tests/tests/9/result @@ -0,0 +1,3 @@ +Applications/ freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/freecell.desktop +Applications/ gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/gataxx.desktop +Applications/ mahjongg.desktop /tmp/menutestdir/xdg_data_dir/applications/mahjongg.desktop diff --git a/menu/tests/tests/9/test b/menu/tests/tests/9/test new file mode 100644 index 0000000..47ba7b3 --- /dev/null +++ b/menu/tests/tests/9/test @@ -0,0 +1,31 @@ +echo ">>> the <Exclude> Keyword" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>Applications</Name> + <Include> + <Or> + <Filename>freecell.desktop</Filename> + <Category>Game</Category> + </Or> + </Include> + <Exclude> + <Filename>glines.desktop</Filename> + </Exclude> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/a/result b/menu/tests/tests/a/result new file mode 100644 index 0000000..d87dffa --- /dev/null +++ b/menu/tests/tests/a/result @@ -0,0 +1,4 @@ +Applications/ company-games-freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/company/games/freecell.desktop +Applications/ company-games-gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/company/games/gataxx.desktop +Applications/ company-games-glines.desktop /tmp/menutestdir/xdg_data_dir/applications/company/games/glines.desktop +Applications/ company-games-mahjongg.desktop /tmp/menutestdir/xdg_data_dir/applications/company/games/mahjongg.desktop diff --git a/menu/tests/tests/a/test b/menu/tests/tests/a/test new file mode 100644 index 0000000..06ab812 --- /dev/null +++ b/menu/tests/tests/a/test @@ -0,0 +1,25 @@ +echo ">>> a test for DesktopFileIDs in submenus" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>Applications</Name> + <Include> + <Category>Game</Category> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications/company/games gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/b/result b/menu/tests/tests/b/result new file mode 100644 index 0000000..c0d98a9 --- /dev/null +++ b/menu/tests/tests/b/result @@ -0,0 +1,5 @@ +Applications/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop +Applications/ gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/gataxx.desktop +Applications/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop +Applications/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop +Applications/ quanta.desktop /tmp/menutestdir/xdg_data_dir/applications/quanta.desktop diff --git a/menu/tests/tests/b/test b/menu/tests/tests/b/test new file mode 100644 index 0000000..0c3bee8 --- /dev/null +++ b/menu/tests/tests/b/test @@ -0,0 +1,35 @@ +echo ">>> a complicated rule ..." + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>Applications</Name> + <Include> + <And> + <Category>Game</Category> + <Category>BoardGame</Category> + </And> + <Or> + <Category>TextEditor</Category> + <Filename>quanta.desktop</Filename> + </Or> + </Include> + <Exclude> + <Filename>mahjongg.desktop</Filename> + </Exclude> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop diff --git a/menu/tests/tests/c/result b/menu/tests/tests/c/result new file mode 100644 index 0000000..9bd54ef --- /dev/null +++ b/menu/tests/tests/c/result @@ -0,0 +1,3 @@ +Apps/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop +Apps/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop +Apps/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop diff --git a/menu/tests/tests/c/test b/menu/tests/tests/c/test new file mode 100644 index 0000000..592b438 --- /dev/null +++ b/menu/tests/tests/c/test @@ -0,0 +1,28 @@ +echo ">>> the <Directory> tag ..." + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + <DefaultDirectoryDirs/> + + <Menu> + <Name>Applications</Name> + <Directory>apps.directory</Directory> + <Include> + <Category>TextEditor</Category> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop +installData ${XDG_DATA_DIR}/desktop-directories apps.directory diff --git a/menu/tests/tests/d/result b/menu/tests/tests/d/result new file mode 100644 index 0000000..1afabea --- /dev/null +++ b/menu/tests/tests/d/result @@ -0,0 +1,5 @@ +Applications/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop +Applications/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop +Applications/ kbabel.desktop /tmp/menutestdir/xdg_data_dir/applications/kbabel.desktop +Applications/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop +Applications/ quanta.desktop /tmp/menutestdir/xdg_data_dir/applications/quanta.desktop diff --git a/menu/tests/tests/d/test b/menu/tests/tests/d/test new file mode 100644 index 0000000..af2cae8 --- /dev/null +++ b/menu/tests/tests/d/test @@ -0,0 +1,31 @@ +echo ">>> two submenus with the same name ..." + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + + <Menu> + <Name>Applications</Name> + <Include> + <Category>TextEditor</Category> + </Include> + </Menu> + <Menu> + <Name>Applications</Name> + <Include> + <Category>Development</Category> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop diff --git a/menu/tests/result-1 b/menu/tests/tests/e/result index be80965..be80965 100644 --- a/menu/tests/result-1 +++ b/menu/tests/tests/e/result diff --git a/menu/tests/test-1 b/menu/tests/tests/e/test index 34bd466..90f83a8 100644 --- a/menu/tests/test-1 +++ b/menu/tests/tests/e/test @@ -1,3 +1,5 @@ +echo ">>> Simple <LegacyDir> test" + LEGACY_DIR=${MENUTESTDIR}/legacy_applnk export LEGACY_DIR diff --git a/menu/tests/tests/f/result b/menu/tests/tests/f/result new file mode 100644 index 0000000..886db8e --- /dev/null +++ b/menu/tests/tests/f/result @@ -0,0 +1,6 @@ +BoardGame/ gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/gataxx.desktop +BoardGame/ mahjongg.desktop /tmp/menutestdir/xdg_data_dir/applications/mahjongg.desktop +Games/ freecell.desktop /tmp/menutestdir/xdg_data_dir/applications/freecell.desktop +Games/ gataxx.desktop /tmp/menutestdir/xdg_data_dir/applications/gataxx.desktop +Games/ glines.desktop /tmp/menutestdir/xdg_data_dir/applications/glines.desktop +Games/ mahjongg.desktop /tmp/menutestdir/xdg_data_dir/applications/mahjongg.desktop diff --git a/menu/tests/tests/f/test b/menu/tests/tests/f/test new file mode 100644 index 0000000..d074a2c --- /dev/null +++ b/menu/tests/tests/f/test @@ -0,0 +1,39 @@ +echo ">>> a complicated <Move> operation" + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + <Move> + <Old>Games1</Old> + <New>Games</New> + </Move> + + <Menu> + <Name>Games1</Name> + <Menu> + <Name>BoardGame</Name> + <Include> + <Category>BoardGame</Category> + </Include> + </Menu> + </Menu> + <Menu> + <Name>Games</Name> + <Include> + <Category>Game</Category> + <OnlyUnallocated/> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications gataxx.desktop mahjongg.desktop freecell.desktop glines.desktop diff --git a/menu/tests/tests/g/result b/menu/tests/tests/g/result new file mode 100644 index 0000000..1942945 --- /dev/null +++ b/menu/tests/tests/g/result @@ -0,0 +1,3 @@ +Applications/ KEdit.desktop /tmp/menutestdir/xdg_config_dir/menus/apps/KEdit.desktop +Applications/ kate.desktop /tmp/menutestdir/xdg_config_dir/menus/apps/kate.desktop +Applications/ kwrite.desktop /tmp/menutestdir/xdg_config_dir/menus/apps/kwrite.desktop diff --git a/menu/tests/tests/g/test b/menu/tests/tests/g/test new file mode 100644 index 0000000..bed0d2d --- /dev/null +++ b/menu/tests/tests/g/test @@ -0,0 +1,25 @@ +echo ">>> a relative <AppDir> tag ..." + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <AppDir>apps</AppDir> + + <Menu> + <Name>Applications</Name> + <Include> + <Category>TextEditor</Category> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_CONFIG_DIR}/menus/apps kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop diff --git a/menu/tests/tests/h/result b/menu/tests/tests/h/result new file mode 100644 index 0000000..9bd54ef --- /dev/null +++ b/menu/tests/tests/h/result @@ -0,0 +1,3 @@ +Apps/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop +Apps/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop +Apps/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop diff --git a/menu/tests/tests/h/test b/menu/tests/tests/h/test new file mode 100644 index 0000000..99b5053 --- /dev/null +++ b/menu/tests/tests/h/test @@ -0,0 +1,28 @@ +echo ">>> a relative <DirectoryDir> tag ..." + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <!-- Search the default locations --> + <DefaultAppDirs/> + <DirectoryDir>desktop-directories</DirectoryDir> + + <Menu> + <Name>Applications</Name> + <Directory>apps.directory</Directory> + <Include> + <Category>TextEditor</Category> + </Include> + </Menu> +</Menu> +EOF + + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop +installData ${XDG_CONFIG_DIR}/menus/desktop-directories apps.directory diff --git a/menu/tests/tests/i/result b/menu/tests/tests/i/result new file mode 100644 index 0000000..de216fc --- /dev/null +++ b/menu/tests/tests/i/result @@ -0,0 +1,5 @@ +Applications/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop +Applications/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop +Applications/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop +Development/ kbabel.desktop /tmp/menutestdir/xdg_data_dir/applications/kbabel.desktop +Development/ quanta.desktop /tmp/menutestdir/xdg_data_dir/applications/quanta.desktop diff --git a/menu/tests/tests/i/test b/menu/tests/tests/i/test new file mode 100644 index 0000000..dc5cf7c --- /dev/null +++ b/menu/tests/tests/i/test @@ -0,0 +1,42 @@ +echo ">>> the <DefaultMergeDirs> tag ..." + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <DefaultAppDirs/> + <DefaultMergeDirs/> + + <Menu> + <Name>Applications</Name> + <Include> + <Category>TextEditor</Category> + </Include> + </Menu> +</Menu> +EOF + + +mkdir ${XDG_CONFIG_DIR}/menus/applications-merged/ +./expand > ${XDG_CONFIG_DIR}/menus/applications-merged/test.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + + <Menu> + <Name>Development</Name> + <Include> + <Category>Development</Category> + </Include> + </Menu> +</Menu> +EOF + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop diff --git a/menu/tests/tests/j/result b/menu/tests/tests/j/result new file mode 100644 index 0000000..de216fc --- /dev/null +++ b/menu/tests/tests/j/result @@ -0,0 +1,5 @@ +Applications/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop +Applications/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop +Applications/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop +Development/ kbabel.desktop /tmp/menutestdir/xdg_data_dir/applications/kbabel.desktop +Development/ quanta.desktop /tmp/menutestdir/xdg_data_dir/applications/quanta.desktop diff --git a/menu/tests/tests/j/test b/menu/tests/tests/j/test new file mode 100644 index 0000000..46d7771 --- /dev/null +++ b/menu/tests/tests/j/test @@ -0,0 +1,42 @@ +echo ">>> the <MergeDir> tag ..." + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <DefaultAppDirs/> + <MergeDir>applications-merged</MergeDir> + + <Menu> + <Name>Applications</Name> + <Include> + <Category>TextEditor</Category> + </Include> + </Menu> +</Menu> +EOF + + +mkdir ${XDG_CONFIG_DIR}/menus/applications-merged/ +./expand > ${XDG_CONFIG_DIR}/menus/applications-merged/test.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + + <Menu> + <Name>Development</Name> + <Include> + <Category>Development</Category> + </Include> + </Menu> +</Menu> +EOF + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop diff --git a/menu/tests/tests/k/result b/menu/tests/tests/k/result new file mode 100644 index 0000000..de216fc --- /dev/null +++ b/menu/tests/tests/k/result @@ -0,0 +1,5 @@ +Applications/ KEdit.desktop /tmp/menutestdir/xdg_data_dir/applications/KEdit.desktop +Applications/ kate.desktop /tmp/menutestdir/xdg_data_dir/applications/kate.desktop +Applications/ kwrite.desktop /tmp/menutestdir/xdg_data_dir/applications/kwrite.desktop +Development/ kbabel.desktop /tmp/menutestdir/xdg_data_dir/applications/kbabel.desktop +Development/ quanta.desktop /tmp/menutestdir/xdg_data_dir/applications/quanta.desktop diff --git a/menu/tests/tests/k/test b/menu/tests/tests/k/test new file mode 100644 index 0000000..42f0d60 --- /dev/null +++ b/menu/tests/tests/k/test @@ -0,0 +1,42 @@ +echo ">>> the <MergeFile> tag ..." + +# Generate applications.menu +mkdir -p ${XDG_CONFIG_DIR}/menus +./expand > ${XDG_CONFIG_DIR}/menus/applications.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + <DefaultAppDirs/> + <MergeFile>applications-merged/test.menu</MergeFile> + + <Menu> + <Name>Applications</Name> + <Include> + <Category>TextEditor</Category> + </Include> + </Menu> +</Menu> +EOF + + +mkdir ${XDG_CONFIG_DIR}/menus/applications-merged/ +./expand > ${XDG_CONFIG_DIR}/menus/applications-merged/test.menu <<EOF + <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" + "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> + +<Menu> + <Name>KDE</Name> + + <Menu> + <Name>Development</Name> + <Include> + <Category>Development</Category> + </Include> + </Menu> +</Menu> +EOF + +# Install .desktop files +installData ${XDG_DATA_DIR}/applications kwrite.desktop KEdit.desktop quanta.desktop kate.desktop kbabel.desktop diff --git a/menu/tests/totest b/menu/tests/totest new file mode 100644 index 0000000..9d90118 --- /dev/null +++ b/menu/tests/totest @@ -0,0 +1,2 @@ +desktop-file-id stuff & overwrite stuff +absolute path |