# coding: utf-8 """This file contains sample data for the test suite - these are written out to temporary files for the relevant tests. """ from __future__ import unicode_literals import sys # With additions from firefox.desktop, to test locale & unicode support gedit_desktop = """[Desktop Entry] Name=gedit Name[ar]=متصفح الوِب فَيَرفُكْس GenericName=Text Editor Comment= Edit text files Keywords=Plaintext;Write; Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ Exec=gedit %U Terminal=false Type=Application StartupNotify=true MimeType=text/plain; Icon=accessories-text-editor Categories=GNOME;GTK;Utility;TextEditor; X-GNOME-DocPath=gedit/gedit.xml X-GNOME-FullName=Text Editor X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=gedit X-GNOME-Bugzilla-Component=general X-GNOME-Bugzilla-Version=3.4.1 X-GNOME-Bugzilla-ExtraInfoScript=/usr/share/gedit/gedit-bugreport Actions=Window;Document; X-Ubuntu-Gettext-Domain=gedit [Desktop Action Window] Name=Open a New Window Exec=gedit --new-window OnlyShowIn=Unity; [Desktop Action Document] Name=Open a New Document Exec=gedit --new-window OnlyShowIn=Unity; """ # Unicode, + TryExec that doesn't exist unicode_desktop = """[Desktop Entry] Name=Abc€þ Type=Application Exec=date TryExec=ewoirjge """ # Invalid - see the Categories line spout_desktop = """[Desktop Entry] Type=Application Encoding=UTF-8 Name=Spout GenericName= Comment= Icon=spout Exec=/usr/games/spout Terminal=false Categories:Application:Game:ArcadeGame """ # Test with invalid UTF-8 gnome_alsamixer_desktop = """[Desktop Entry] Name=GNOME ALSA Mixer Comment=ALSA sound mixer for GNOME Comment[es]=Mezclador de sonido ALSA para GNOME Comment[fr]=Mélangeur de son ALSA pour GNOME Exec=gnome-alsamixer Type=Application """ # TryExec that should exist python_desktop = """[Desktop Entry] Name=Python Comment=Dynamic programming language Exec=%s TryExec=%s Type=Application """ % (sys.executable, sys.executable) recently_used = """ file:///home/thomas/foo/bar.ods application/vnd.oasis.opendocument.spreadsheet 1272385187 openoffice.org staroffice starsuite file:///tmp/2.ppt application/vnd.ms-powerpoint 1272378716 openoffice.org staroffice starsuite """ applications_menu = """ Applications X-GNOME-Menu-Applications.directory /etc/X11/applnk /usr/share/gnome/apps Accessories Utility.directory Utility Accessibility System Universal Access Utility-Accessibility.directory Accessibility Settings Development Development.directory Development emacs.desktop Education Education.directory Education Science Science GnomeScience.directory Education Science Games Game.directory Game ActionGame AdventureGame ArcadeGame BoardGame BlocksGame CardGame KidsGame LogicGame Simulation SportsGame StrategyGame Action ActionGames.directory ActionGame Adventure AdventureGames.directory AdventureGame Arcade ArcadeGames.directory ArcadeGame Board BoardGames.directory BoardGame Blocks BlocksGames.directory BlocksGame Cards CardGames.directory CardGame Kids KidsGames.directory KidsGame Logic LogicGames.directory LogicGame Role Playing RolePlayingGames.directory RolePlaying Simulation SimulationGames.directory Simulation Sports SportsGames.directory SportsGame Strategy StrategyGames.directory StrategyGame Graphics Graphics.directory Graphics Internet Network.directory Network Multimedia AudioVideo.directory AudioVideo Office Office.directory Office System System-Tools.directory System Settings Game Preferences Settings.directory Settings System X-GNOME-Settings-Panel Administration Settings-System.directory Settings System X-GNOME-Settings-Panel Other X-GNOME-Other.directory Core Screensaver X-GNOME-Settings-Panel Other Debian debian-menu.menu Debian.directory ubuntu-software-center.desktop ubuntu-software-center.desktop """ legacy_menu = """ Legacy legacy_dir """ kde_legacy_menu = """ KDE Legacy """ layout_menu = """ Layout More More Games Steam Action Steam Arcade Accessories """ mime_globs2_a = """#globs2 MIME data file 55:text/x-diff:*.patch 50:text/x-c++src:*.C:cs 50:text/x-python:*.py 10:text/x-readme:readme* """ mime_globs2_b = """#globs2 MIME data file # Add to existing MIMEtype 50:text/x-diff:*.diff # Remove one 50:text/x-python:__NOGLOBS__ # Replace one 40:text/x-readme:__NOGLOBS__ 20:text/x-readme:RDME:cs """ mime_magic_db = b"""MIME-Magic\0 [50:image/png] >0=\0\x04\x89PNG [50:image/jpeg] >0=\0\x03\xff\xd8\xff >0=\0\x02\xff\xd8 [50:image/openraster] >0=\0\x04PK\x03\x04 1>30=\0\x08mimetype 2>38=\0\x10image/openraster [80:image/svg+xml] >0=\0\x0d0=\0\x040=\0\x0a8BPS \0\0\0\0&\xff\xff\xff\xff\0\0\xff\xff\xff\xff [40:application/x-executable] >0=\0\02\x01\x11~2 [10:application/madeup] >0=\0\x05ab cd >10=\0\x05ab de&\xff\xff \xff\xff [10:application/imaginary] >0=\0\x03abc@unhandled_future_field [10:application/toberemoved] >0=\0\x03def [10:application/tobereplaced] >0=\0\x03ghi [10:application/tobeaddedto] >0=\0\x03mno """ mime_magic_db2 = b"""MIME-Magic\0 [10:application/toberemoved] >0=__NOMAGIC__ [10:application/tobereplaced] >0=__NOMAGIC__ >1=\0\x03jkl [10:application/tobeaddedto] >1=\0\x03pqr """ png_data = b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x06\x00\x00\x00\x1f\x15\xc4\x89\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x00\rIDAT\x08\x99c\xf8\x7f\x83\xe1?\x00\x07\x88\x02\xd7\xd9\n\xd8\xdc\x00\x00\x00\x00IEND\xaeB`\x82' icon_data = """[Icon Data] DisplayName=Mime text/plain EmbeddedTextRectangle=100,100,900,900 AttachPoints=200,200|800,200|500,500|200,800|800,800 """