# 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 = """
"""
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\x04