aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Strassel <info@jonas-strassel.de>2021-01-24 01:29:40 +0100
committerJonas Strassel <info@jonas-strassel.de>2021-01-24 01:38:29 +0100
commit69a1a43f47b40dc3c6ab0edc59d78e7a690b4a7c (patch)
treecfd1e1ca0c60d2c2938746e1b37f04311b98d659
parent232a3f9c00accd03cd3afd2c5f515051e142c74f (diff)
downloadsway-launcher-desktop-69a1a43f47b40dc3c6ab0edc59d78e7a690b4a7c.tar.gz
sway-launcher-desktop-69a1a43f47b40dc3c6ab0edc59d78e7a690b4a7c.zip
fix: deal with X- entries
-rwxr-xr-xsway-launcher-desktop.sh7
-rw-r--r--tests/data/desktop-files/0/applications/org.inkscape.Inkscape.desktop306
-rwxr-xr-xtests/entries.bats13
3 files changed, 324 insertions, 2 deletions
diff --git a/sway-launcher-desktop.sh b/sway-launcher-desktop.sh
index df25e92..6da0101 100755
--- a/sway-launcher-desktop.sh
+++ b/sway-launcher-desktop.sh
@@ -132,6 +132,13 @@ function entries() {
a++;
actions[a,"key"]=$0
}
+ /^\[X-/{
+ sub("^\\[X-", "");
+ sub("\\]$", "");
+ block="action";
+ a++;
+ actions[a,"key"]=$0
+ }
/^Name=/{ (block=="action")? actions[a,"name"]=$2 : name=$2 }
ENDFILE{
if (application){
diff --git a/tests/data/desktop-files/0/applications/org.inkscape.Inkscape.desktop b/tests/data/desktop-files/0/applications/org.inkscape.Inkscape.desktop
new file mode 100644
index 0000000..e90956a
--- /dev/null
+++ b/tests/data/desktop-files/0/applications/org.inkscape.Inkscape.desktop
@@ -0,0 +1,306 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+[Desktop Entry]
+Version=1.0
+Name[ar]=إنكسكيب
+Name[as]=ইনস্কেপ
+Name[be]=Inkscape
+Name[bg]=Inkscape
+Name[bn_BD]=ইন্কস্কেপ
+Name[br]=Inkscape
+Name[brx]=इङ्कस्केप
+Name[ca]=Inkscape
+Name[ca@valencia]=Inkscape
+Name[cs]=Inkscape
+Name[da]=Inkscape
+Name[de]=Inkscape
+Name[doi]=इंकस्केप
+Name[el]=Inkscape
+Name[en_GB]=Inkscape
+Name[es]=Inkscape
+Name[eu]=Inkscape
+Name[fi]=Inkscape
+Name[fr]=Inkscape
+Name[gl]=Inkscape
+Name[gu]=Inkscape
+Name[he]=אינקסקייפ
+Name[hi]=इंकस्केप
+Name[hr]=Inkscape
+Name[hu]=Inkscape
+Name[id]=Inkscape
+Name[is]=Inkscape
+Name[it]=Inkscape
+Name[ja]=Inkscape
+Name[km]=Inkscape
+Name[kn]=ಇಂಕ್‌ಸ್ಕೇಪ್
+Name[ko]=잉크스케이프
+Name[kok]=इंकस्केप
+Name[kok@latin]=Inkscape
+Name[ks@aran]=اِنکسکیپ
+Name[ks@deva]=इनकसकेप
+Name[lv]=Inkscape
+Name[mai]=Inkscape
+Name[ml]=ഇങ്ക്സ്കെയ്പ്
+Name[mni]=ꯏꯪꯛꯁ꯭ꯀꯦꯞ
+Name[mni@beng]=ইঙ্কস্কেপ
+Name[mr]=इंकस्केप
+Name[nb]=Inkscape
+Name[nl]=Inkscape
+Name[or]=ଇଙ୍କ୍ସ୍କେପ
+Name[pl]=Inkscape
+Name[pt_BR]=Inkscape
+Name[pt]=Inkscape
+Name[ro]=Inkscape
+Name[ru]=Inkscape
+Name[sa]=इङ्क्स्केप्
+Name[sat@deva]=काली ञेनेल
+Name[sat]=ᱠᱟᱞᱤ ᱧᱮᱱᱮᱞ
+Name[sd]=اِنڪسڪيپ
+Name[sd@deva]=इंकस्केप
+Name[sk]=Inkscape
+Name[sl]=Inkscape
+Name[sr@latin]=Inkscape
+Name[sr]=Inkscape
+Name[sv]=Inkscape
+Name[ta]=Inkscape
+Name[te]=ఇంక్‌స్కేప్
+Name[tr]=Inkscape
+Name[uk]=Inkscape
+Name[ur]=انك اسكیپ
+Name[vi]=Inkscape
+Name[zh_CN]=Inkscape
+Name[zh_TW]=Inkscape
+Name=Inkscape
+GenericName[ar]=محرر الرسومات الشعاعية
+GenericName[as]=ভেক্টৰ গ্ৰাফিক্স সম্পাদনকৰ্তা
+GenericName[be]=Рэдактар вэктарнай ґрафікі
+GenericName[bg]=Редактор за векторна графика
+GenericName[bn_BD]=ভেক্টর গ্রাফিক্স সম্পাদক
+GenericName[br]=Embanner kevregadoù sturiadel
+GenericName[brx]=भेक्टर ग्राफिक्स सुजुगिरि
+GenericName[ca]=Editor de gràfics vectorials
+GenericName[ca@valencia]=Editor de gràfics vectorials
+GenericName[cs]=Editor vektorové grafiky
+GenericName[da]=Editor til vektorgrafik
+GenericName[de]=Vektorgrafikeditor
+GenericName[doi]=वैक्टर ग्राफिक्स संपादक
+GenericName[el]=Επεξεργαστής διανυσματικών γραφικών
+GenericName[en_GB]=Vector Graphics Editor
+GenericName[es]=Editor de gráficos vectoriales
+GenericName[eu]=Grafiko bektorialen editorea
+GenericName[fi]=vektorigrafiikkaeditori
+GenericName[fr]=Éditeur d'images vectorielles SVG Inkscape
+GenericName[gl]=Editor de imaxes vectoriais
+GenericName[gu]=વ્હેક્ટર ગ્રાફિક્સ સંપાદક
+GenericName[he]=עורך גרפיקה וקטורית
+GenericName[hi]=वेक्टर ग्राफिक्स संपादक
+GenericName[hr]=Uređivač vektorskih grafika
+GenericName[hu]=Vektorgrafikai szerkesztő
+GenericName[id]=Penyunting Grafik Vektor
+GenericName[is]=Teikniforrit fyrir vigramyndir / línuteikningar
+GenericName[it]=Grafica vettoriale SVG
+GenericName[ja]=ベクターグラフィックエディター
+GenericName[km]=កម្មវិធី​កែ​សម្រួល​ក្រាហ្វិក​វ៉ិចទ័រ
+GenericName[kn]=ವೆಕ್ಟರ್ ಗ್ರಾಫಿಕ್ಸ್ ಸಂಪಾದಕ
+GenericName[ko]=벡터 그래픽 편집기
+GenericName[kok]=व्हेक्टर ग्राफिक्स संपादक
+GenericName[kok@latin]=vekttor grafiks edittor
+GenericName[ks@aran]=ویکٹر گرافکس اڈیٹر
+GenericName[ks@deva]=वयक्टर ग्राफ़िक्स अडीटर
+GenericName[lv]=Vektoru grafikas redaktors
+GenericName[mai]=सदिश आलेखी संपादक
+GenericName[ml]=വെക്ടര്‍ ഗ്രാഫിക്സ് എഡിറ്റര്‍
+GenericName[mni]=ꯚꯦꯛꯇꯔ ꯒ꯭ꯔꯥꯐꯤꯛꯁ ꯏꯗꯤꯇꯔ
+GenericName[mni@beng]=ভেক্তর গ্রাফিক্স ইদিতর
+GenericName[mr]=व्हेक्टर ग्राफिक्स संपादक
+GenericName[nb]=Tegneprogram for vektorgrafikk
+GenericName[nl]=Vector tekenpakket
+GenericName[or]=ଭେକ୍ଟର ଗ୍ରାଫିକ୍ସ ସଂପାଦ୍କ
+GenericName[pl]=Edytor grafiki wektorowej
+GenericName[pt_BR]=Editor de Imagens Vetoriais
+GenericName[pt]=Editor de Imagens Vetoriais
+GenericName[ro]=Editor de grafică vectorială
+GenericName[ru]=Редактор векторной графики
+GenericName[sa]=वेक्टर् सुचित्रीयसंपादकः
+GenericName[sat@deva]=वेक्टर गार चिता़र सासापड़ाव
+GenericName[sat]=ᱣᱮᱠᱴᱨ ᱜᱟᱨ ᱪᱤᱛᱟᱹᱨ ᱥᱟᱥᱟᱯᱲᱟᱣ
+GenericName[sd]=ويڪٽر اکري چٽ سمپادڪ
+GenericName[sd@deva]=वेक्टर अखिरी चिट संपादकु
+GenericName[sk]=editor vektorovej grafiky
+GenericName[sl]=Urejevalnik vektorskih slik
+GenericName[sr@latin]=Program za vektorsko crtanje
+GenericName[sr]=Програм за векторско цртање
+GenericName[ta]=வெக்டார் வரைகலை எடிட்டர்
+GenericName[te]=సదిశ రేఖాచిత్రాల కూర్పరి
+GenericName[tr]=Vektör Grafik Düzenleyici
+GenericName[uk]=Редактор векторної графіки
+GenericName[ur]=انك اسكیپ ویكٹر گرافیكس ایڈیٹر
+GenericName[vi]=Trình xử lý ảnh Véc-tơ
+GenericName[zh_CN]=矢量图形编辑器
+GenericName[zh_TW]=向量繪圖軟體
+GenericName=Vector Graphics Editor
+X-GNOME-FullName=Inkscape Vector Graphics Editor
+Comment[ar]=إنشاء و تحرير الرسومات الشعاعية
+Comment[as]=জুখিব পৰা ভেক্টৰ গ্ৰাফিক্স ছবিবোৰ তৈয়াৰ আৰু সম্পাদনা কৰক
+Comment[be]=Стварэньне й зьмяненьне відарысаў вэктарнай ґрафікі (SVG)
+Comment[bg]=Създаване и промяна на Scalable Vector Graphics
+Comment[bn]=স্কেলেবল ভেক্টর গ্রাফিক্স ছবি তৈরী ও সম্পাদনা করুন
+Comment[bn_BD]=স্কেলেবল ভেক্টর গ্রাফিক্স ছবি তৈরী ও সম্পাদনা করুন
+Comment[br]=Krouiñ hag embann skeudennoù mod SVG (Scalable Vector Graphics)
+Comment[brx]=सुजाथाव भेक्टर ग्राफिक्स मुसुखाफोर सोरजि आरो सुजु
+Comment[ca]=Creeu i editeu imatges de gràfics de vectors escalables
+Comment[ca@valencia]=Creeu i editeu imatges de gràfics de vectors escalables
+Comment[cs]=Vytvářejte a upravujte obrázky Scalable Vector Graphics
+Comment[da]=Opret og rediger SVG-billeder
+Comment[de]=Skalierbare Vektorgrafiken erstellen und bearbeiten
+Comment[doi]=मापजोग वैक्टर ग्राफिक्स बिंब बनाओ ते संपादत करो
+Comment[dz]=ཆ་ཚད་འཇལ་བཏུབ་པའི་མཉམ་ཐིག་ཚད་རིས་ཀྱི་གཟུགས་བརྙན་ཚུ་གསར་བསྐྲུན་དང་ཞུན་དག་འབད།
+Comment[el]=Δημιουργία και τροποποίηση κλιμακώσιμων διανυσματικών εικόνων γραφικών
+Comment[en_AU]=Create and edit Scalable Vector Graphics images
+Comment[en_GB]=Create and edit Scalable Vector Graphics images
+Comment[eo]=Kreu kaj redaktu bildoj en formato SVG (Scalable Vector Graphics)
+Comment[es]=Cree y edite Gráficos Vectoriales Escalables (SVG)
+Comment[et]=SVG-vektorgraafikas piltide joonistamine ja muutmine
+Comment[eu]=Sortu eta editatu Grafiko Bektorial Eskalakor (SVG) formatuko irudiak
+Comment[fi]=Luo ja muokkaa Scalable Vector Graphics -piirroksia
+Comment[fr]=Créer et éditer des images Scalable Vector Graphics
+Comment[gl]=Cree e edite imaxes Scalable Vector Graphics
+Comment[gu]=માપવાયોગ્ય વ્હેક્ટર ગ્રાફિક્સ છવિઓ બનાવો અને સંપાદિત કરો
+Comment[he]=יצירה ועריכה של תמונות בגרפיקת וקטורים נמתחת
+Comment[hi]=मापनीय वेक्टर ग्राफिक्स छवियां बनाएं और संपादित करें
+Comment[hr]=Stvori i uredi skalabilne vektorske grafike
+Comment[hu]=Scalable Vector Graphics (méretezhető vektorgrafika, SVG)-képek létrehozása és szerkesztése
+Comment[id]=Membuat dan mengedit gambar Scalable Vector Graphics
+Comment[is]=Vinna með SVG vektorteikningar (Scalable Vector Graphics)
+Comment[it]=Crea e modifica immagini Scalable Vector Graphics
+Comment[ja]=Scalable Vector Graphics (SVG) 画像の作成と編集を行います
+Comment[km]=បង្កើត និង​កែសម្រួល​​​រូបភាព​ក្រាហ្វិក​វ៉ិចទ័រ​ដែល​អាច​ធ្វើ​មាត្រដ្ឋាន​បាន​​
+Comment[kn]=ಸ್ಕೇಲೆಬಲ್ ವೆಕ್ಟರ್ ಗ್ರಾಫಿಕ್ಸ್ ಚಿತ್ರಗಳನ್ನು ರಚಿಸಿ ಹಾಗು ಸಂಪಾದಿಸಿ
+Comment[ko]=SVG(Scalable Vector Graphics) 이미지 만들기 및 편집하기
+Comment[kok]=स्केलेबल व्हेक्टर ग्राफिक्स प्रतिमा तयार आणि संपादित करात
+Comment[kok@latin]=Mapache vekttor grafiks rupnnem roch ani sompadit kor
+Comment[ks@aran]=بناویوتہٕ ادارت کٔریو قابلئ پیمائش ویکٹر گرافکس شکلہٕ
+Comment[ks@deva]=बनावीव तअ. इदारत कॲरीव क़ाबलिअ पेयमाईश वयक्टर ग्राफ़िक्स शकलअ.
+Comment[lt]=Kurti ir redaguoti vektorinius grafinius piešinius
+Comment[lv]=Izveidojiet un labojiet mērogojamās vektoru grafikas (SVG) attēlus
+Comment[mai]=मापनीय सदिश आलेखी छवि बनाउ आओर संपादित करू
+Comment[ml]=സ്കെയിലബിള്‍ വെക്റ്റര്‍ ഗ്രാഫിക്സ് ചിത്രങ്ങളെ നിര്‍മ്മിക്കുകയൊ എഡിറ്റൊ ചെയ്യുക
+Comment[mni]=ꯁ꯭ꯀꯦꯂꯦꯕꯜ ꯚꯦꯛꯇꯔ ꯒ꯭ꯔꯥꯐꯤꯛꯁ ꯏꯃꯦꯖꯁꯤꯡ ꯁꯦꯝꯒꯠꯂꯣ ꯑꯃꯁꯨꯡ ꯁꯦꯝꯗꯣꯛꯎ
+Comment[mni@beng]=স্কেলেবল ভেক্তর গ্রাফিক্স ইমেজশিং শেমগৎলো অমসুং শেমদোকউ
+Comment[mr]=स्केलेबल व्हेक्टर ग्राफिक्स प्रतिमा तयार आणि संपादित करा
+Comment[nb]=Lag og rediger Skalerbar VektorGrafikk-bilder
+Comment[ne]=स्केलेबुल भेक्टर ग्राफिक्स छविहरू सिर्जना गर्नुहोस् र सम्पादन गर्नुहोस्
+Comment[nl]=Scalable Vector Graphics-afbeeldingen maken en bewerken
+Comment[nn]=Lag og rediger skalerbare vektorbilete (SVG)
+Comment[or]=ସ୍କେଲେବଲ େଭକ୍ଟର ଗ୍ରାଫିକ୍ସ ଚିତ୍ରସବୁ ସୃଷ୍ଟି ଏବଂ ସଂପାଦନା କରନ୍୍ତୁ
+Comment[pa]=ਸਕੇਲੇਬਲ ਵੈਕਟਰ ਗਰਾਫਿਕਸ ਚਿੱਤਰ ਬਣਾਓ ਅਤੇ ਸੋਧੋ
+Comment[pl]=Tworzenie i edycja grafiki wektorowej SVG
+Comment[pt_BR]=Crie e edite desenhos vetoriais escaláveis (SVG)
+Comment[pt]=Criar e editar imagens gráficas vetoriais escaláveis
+Comment[ro]=Creează și editează imagini în format Scalable Vector Graphics
+Comment[ru]=Создание и изменение масштабируемой векторной графики в формате SVG
+Comment[sa]=माप्य-वेक्टर्-सुचित्रीय-चित्राणि उत्पाद्य सम्पादय
+Comment[sat@deva]=नाप दाड़ेयाक् वेक्टर गार चिता़र आहला तेयार मे आर सासापड़ाव मे
+Comment[sat]=ᱱᱟᱯ ᱫᱟᱲᱮᱭᱟᱜ ᱣᱮᱠᱴᱨ ᱜᱟᱨ ᱪᱤᱛᱟᱹᱨ ᱟᱦᱞᱟ ᱛᱮᱭᱟᱨ ᱢᱮ ᱟᱨ ᱥᱟᱥᱟᱯᱲᱟᱣ ᱢᱮ
+Comment[sd]=ماپڻ جوڳا ويڪٽر اکري چٽ ۽ عڪس خلقيو ۽ سمپادت ڪريو
+Comment[sd@deva]=मापण जोॻो वेक्टर अखिरी चिट ऐं अक्स खलिकियो ऐं संपादित करियो.
+Comment[sk]=Tvorba a úprava obrázkov Scalable Vector Graphics
+Comment[sl]=Ustvarjajte in urejajte vektorske slike SVG
+Comment[sr@latin]=Pravljenje i uređivanje SVG vektorskih slika
+Comment[sr]=Прављење и уређивање SVG векторских слика
+Comment[sv]=Skapa och redigera SVG-bilder
+Comment[ta]=அளவிடக்கூடிய வெக்டார் வரைகலைகளின் படங்களை உருவாக்கி திருத்தவும்
+Comment[te]=సదిశ రేఖాచిత్రాలని సృష్టించండి మరియు దిద్దుబాటు చేయండి
+Comment[th]=สร้างและแก้ไขภาพ Scalable Vector Graphics
+Comment[tr]=Ölçeklenebilir Vektör Grafik görüntüleri oluşturur ve düzenler
+Comment[uk]=Створення та редагування зображень у форматі SVG
+Comment[ur]=اسكیلیبل ویكٹر گرافیكس امیجس تخلیق اور مرتب كریں
+Comment[vi]=Tạo và sửa ảnh véc-tơ co giãn được
+Comment[zh_CN]=创建、编辑可缩放矢量图形图像
+Comment[zh_TW]=建立和編輯可縮放向量繪圖圖形
+Comment=Create and edit Scalable Vector Graphics images
+Keywords[ar]=صورة;محرّر;شعاع;رسم;
+Keywords[bg]=image;editor;vector;drawing;
+Keywords[ca]=imatge;editor;vector;dibuix;
+Keywords[ca@valencia]=imatge;editor;vector;dibuix;
+Keywords[cs]=obrázek;editor;vektor;kresba;
+Keywords[da]=billede;editor;redigering;vektor;tegning;
+Keywords[de]=image;editor;vector;drawing;
+Keywords[el]=εικόνα;επεξεργαστής;διάνυσμα;σχεδίαση;
+Keywords[en_GB]=image;editor;vector;drawing;
+Keywords[es]=imagen, editor; vectorial; dibujo;
+Keywords[eu]=irudia;editotea;bektoriala;marrazkia;
+Keywords[fi]=kuva;editori;vektori;piirustus;
+Keywords[fr]=image;éditeur;vectoriel;dessin;
+Keywords[hr]=slika;uređivač;vektor;crtež;
+Keywords[hu]=kép;szerkesztő;vektor;rajzolás;
+Keywords[is]=mynd;ritill;vigur;vektor;línur;teikning;
+Keywords[it]=immagine;editor;vettoriale;disegno;
+Keywords[ko]=이미지;편집기;벡터;그리기;
+Keywords[lv]=attēls;redaktors;vektors;zīmējums;
+Keywords[nl]=image;editor;vector;drawing;
+Keywords[pl]=obaz; edytor; wektor; rysowanie;
+Keywords[pt_BR]=imagem;editor;vetor;desenho;
+Keywords[pt]=imagem;editor;vetorial;desenho;
+Keywords[ro]=imagine;editor;vector;desen;
+Keywords[ru]=image;editor;vector;drawing;изображение;редактор;вектор;рисунок;
+Keywords[sk]=obrázok;editor;vektorový;kreslenie;
+Keywords[sv]=bild; redaktör; vektor; ritning;
+Keywords[tr]=görüntü;düzenleyici;vektör;çizim;
+Keywords[uk]=image;editor;vector;drawing;зображення;редактор;векторне;вектор;малювання;
+Keywords[ur]=تصویر; ایڈیٹر; سمتیہ; ڈرائنگ;
+Keywords[zh_CN]=image;editor;vector;drawing;矢量;图像;编辑;编辑器;向量;绘图;
+Keywords[zh_TW]=影像;編輯器;向量;圖畫;
+Keywords=image;editor;vector;drawing;
+Type=Application
+Categories=Graphics;VectorGraphics;GTK;
+MimeType=image/svg+xml;image/svg+xml-compressed;application/vnd.corel-draw;application/pdf;application/postscript;image/x-eps;application/illustrator;image/cgm;image/x-wmf;application/x-xccx;application/x-xcgm;application/x-xcdt;application/x-xsk1;application/x-xcmx;image/x-xcdr;application/visio;application/x-visio;application/vnd.visio;application/visio.drawing;application/vsd;application/x-vsd;image/x-vsd;
+Exec=inkscape %F
+TryExec=inkscape
+Terminal=false
+StartupNotify=true
+Icon=org.inkscape.Inkscape
+X-Ayatana-Desktop-Shortcuts=Drawing
+
+[X-Drawing Shortcut Group]
+Name[ar]=رسم جديد
+Name[bg]=Нова рисунка
+Name[bn_BD]=নতুন ড্রইং
+Name[br]=Tresadenn nevez
+Name[ca]=Dibuix nou
+Name[ca@valencia]=Dibuix nou
+Name[cs]=Nová kresba
+Name[da]=Ny tegning
+Name[de]=Neue Zeichnung
+Name[el]=Νέο σχέδιο
+Name[en_GB]=New Drawing
+Name[es]=Dibujo nuevo
+Name[eu]=Marrazki berria
+Name[fi]=Uusi piirros
+Name[fr]=Nouveau dessin
+Name[hi]=नया चित्र
+Name[hr]=Novi crtež
+Name[hu]=Új rajz
+Name[id]=Gambar Baru
+Name[is]=Ný teikning
+Name[it]=Nuovo disegno
+Name[ja]=新しいベクター画像
+Name[ko]=새 그림
+Name[lv]=Jauns zīmējums
+Name[nb]=Ny tegning
+Name[nl]=Nieuwe tekening
+Name[pl]=Nowy Rysunek
+Name[pt_BR]=Novo Desenho
+Name[pt]=Novo Desenho
+Name[ro]=Desen nou
+Name[ru]=Новый рисунок
+Name[sk]=Nová kresba
+Name[sl]=Nova risba
+Name[sr@latin]=Novi crtež
+Name[sr]=Нови цртеж
+Name[tr]=Yeni Çizim
+Name[uk]=Новий малюнок
+Name[zh_CN]=新建绘图
+Name[zh_TW]=新增圖畫
+Name=New Drawing
+Exec=inkscape
+TargetEnvironment=Unity
diff --git a/tests/entries.bats b/tests/entries.bats
index dd77fd8..0b50876 100755
--- a/tests/entries.bats
+++ b/tests/entries.bats
@@ -10,15 +10,24 @@
[[ ${lines[2]} =~ ^data/desktop-files/0/applications/firefox.desktop.*Firefox.*(New Private Window).*new-private-window ]]
}
+@test "Inkscape desktop entry and all its actions are extracted" {
+ run ../sway-launcher-desktop.sh entries data/desktop-files/0/applications/org.inkscape.Inkscape.desktop
+ echo -e "OUTPUT:\n$output"
+ [ "$status" -eq 0 ]
+ [[ ${lines[0]} =~ data/desktop-files/0/applications/org.inkscape.Inkscape.desktop ]]
+ [[ ${lines[0]} =~ ^data/desktop-files/0/applications/org.inkscape.Inkscape.desktop.*Inkscape ]]
+ [[ ${lines[1]} =~ ^data/desktop-files/0/applications/org.inkscape.Inkscape.desktop.*Inkscape.*(New.*Drawing).* ]]
+}
+
@test "Wildcard expansion works for extraction of desktop files" {
run ../sway-launcher-desktop.sh entries data/desktop-files/0/applications/*.desktop
[ "$status" -eq 0 ]
- [[ ${#lines[@]} == 6 ]]
+ [[ ${#lines[@]} == 8 ]]
}
@test "Reoccurring desktop file ids are not parsed twice" {
run ../sway-launcher-desktop.sh entries data/desktop-files/**/*.desktop
echo "EXPECTED: foo-bar.desktop ACTUAL: $output"
[ "$status" -eq 0 ]
- [[ ${#lines[@]} == 6 ]]
+ [[ ${#lines[@]} == 8 ]]
}