and move efreet tests out of src tree too.

SVN revision: 55641
devs/devilhorns/wayland_egl
Carsten Haitzler 12 years ago
parent e1ac73922d
commit fa14105442
  1. 48
      legacy/efreet/Makefile.am
  2. 18
      legacy/efreet/configure.ac
  3. 2
      legacy/efreet/src/Makefile.am
  4. 7
      legacy/efreet/src/tests/.cvsignore
  5. 69
      legacy/efreet/src/tests/Makefile.am
  6. 8
      legacy/efreet/src/tests/compare/.cvsignore
  7. 15
      legacy/efreet/src/tests/compare/Makefile.am
  8. 527
      legacy/efreet/src/tests/compare/comp.h
  9. 27
      legacy/efreet/src/tests/compare/efreet_alloc.c
  10. 23
      legacy/efreet/src/tests/compare/efreet_menu_alloc.c
  11. 2
      legacy/efreet/src/tests/data/.cvsignore
  12. 18
      legacy/efreet/src/tests/data/Makefile.am
  13. BIN
      legacy/efreet/src/tests/data/entry
  14. BIN
      legacy/efreet/src/tests/data/entry.png
  15. 3
      legacy/efreet/src/tests/data/long.ini
  16. 41
      legacy/efreet/src/tests/data/preferences.menu
  17. 2
      legacy/efreet/src/tests/data/sub/.cvsignore
  18. 8
      legacy/efreet/src/tests/data/sub/Makefile.am
  19. 5
      legacy/efreet/src/tests/data/sub/test.desktop
  20. 8
      legacy/efreet/src/tests/data/test.desktop
  21. 21
      legacy/efreet/src/tests/data/test.ini
  22. 52
      legacy/efreet/src/tests/data/test.menu
  23. 2341
      legacy/efreet/src/tests/data/test_garbage
  24. 14
      legacy/efreet/src/tests/data/test_menu_bad_comment.menu
  25. 11
      legacy/efreet/src/tests/data/test_menu_slash_bad.menu
  26. 8
      legacy/efreet/src/tests/data/test_type.desktop
  27. 143
      legacy/efreet/src/tests/ef_cache.c
  28. 307
      legacy/efreet/src/tests/ef_data_dirs.c
  29. 401
      legacy/efreet/src/tests/ef_desktop.c
  30. 605
      legacy/efreet/src/tests/ef_icon_theme.c
  31. 174
      legacy/efreet/src/tests/ef_ini.c
  32. 85
      legacy/efreet/src/tests/ef_locale.c
  33. 150
      legacy/efreet/src/tests/ef_menu.c
  34. 58
      legacy/efreet/src/tests/ef_mime.c
  35. 11
      legacy/efreet/src/tests/ef_test.h
  36. 29
      legacy/efreet/src/tests/ef_utils.c
  37. 134
      legacy/efreet/src/tests/efreet_icon_cache_dump.c
  38. 57
      legacy/efreet/src/tests/efreet_spec_test.c
  39. 103
      legacy/efreet/src/tests/efreet_suite.c
  40. 10
      legacy/efreet/src/tests/efreet_suite.h
  41. 25
      legacy/efreet/src/tests/efreet_test_efreet.c
  42. 25
      legacy/efreet/src/tests/efreet_test_efreet_cache.c
  43. 180
      legacy/efreet/src/tests/main.c

@ -28,54 +28,8 @@ efreet.spec.in \
efreet.spec \
README
.PHONY: doc coverage
.PHONY: doc
doc:
@echo "entering doc/"
make -C doc doc
# Unit tests
if EFL_ENABLE_TESTS
check-local:
@./src/tests/efreet_suite
else
check-local:
@echo "reconfigure with --enable-tests"
endif
# Coverage report
if EFL_ENABLE_COVERAGE
lcov-reset:
@rm -rf coverage
@find . -name "*.gcda" -exec rm {} \;
@lcov --directory . --zerocounters
lcov-report:
@mkdir coverage
@lcov --compat-libtool --directory $(top_srcdir)/src --capture --output-file coverage/coverage.info
@lcov -l coverage/coverage.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > coverage/remove
@lcov -r coverage/coverage.info `cat coverage/remove` > coverage/coverage.cleaned.info
@rm coverage/remove
@mv coverage/coverage.cleaned.info coverage/coverage.info
@genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info
coverage:
@make lcov-reset
@make check
@make lcov-report
else
lcov-reset:
@echo "reconfigure with --enable-coverage"
lcov-report:
@echo "reconfigure with --enable-coverage"
coverage:
@echo "reconfigure with --enable-tests --enable-coverage"
endif

@ -210,17 +210,6 @@ AC_SUBST(lt_enable_auto_import)
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(strlcpy)
### Unit tests, coverage
EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
EFREET_CFLAGS="${EFREET_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
EFREET_LIBS="${EFREET_LIBS} ${EFL_COVERAGE_LIBS}"
if test "x$enable_coverage" = "xyes" ; then
EFREET_CFLAGS="${EFREET_CFLAGS} ${EFL_DEBUG_CFLAGS}"
fi
AC_SUBST(requirement_efreet)
AC_OUTPUT([
@ -233,10 +222,6 @@ doc/Makefile
doc/Doxyfile
src/Makefile
src/lib/Makefile
src/tests/Makefile
src/tests/data/Makefile
src/tests/data/sub/Makefile
src/tests/compare/Makefile
src/bin/Makefile
])
@ -259,9 +244,6 @@ echo " Sloppy.............: ${enable_sloppy_spec}"
echo
echo " Icon cache...........: ${enable_icon_cache}"
echo
echo " Tests................: ${enable_tests}"
echo " Coverage.............: ${enable_coverage}"
echo
echo " Documentation........: ${build_doc}"
echo
echo "Compilation............: make (or gmake)"

@ -1,4 +1,4 @@
SUBDIRS = lib bin tests
SUBDIRS = lib bin
MAINTAINERCLEANFILES = Makefile.in

@ -1,7 +0,0 @@
.deps
.libs
Makefile
Makefile.in
efreet_spec_test
efreet_test
efreet_cache_test

@ -1,69 +0,0 @@
SUBDIRS = data compare
MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = \
-I. \
-I$(top_srcdir)/src/lib \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
@EFREET_CFLAGS@
bin_PROGRAMS = efreet_test efreet_spec_test efreet_cache_test
if ICON_CACHE
bin_PROGRAMS += efreet_icon_cache_dump
endif
efreet_test_LDADD = $(top_builddir)/src/lib/libefreet.la \
$(top_builddir)/src/lib/libefreet_mime.la \
@EFREET_LIBS@
efreet_test_SOURCES = \
ef_test.h \
ef_data_dirs.c \
ef_icon_theme.c \
ef_ini.c \
ef_utils.c \
ef_desktop.c \
ef_menu.c \
ef_mime.c \
main.c
if DEFAULT_VISIBILITY
efreet_test_SOURCES += \
ef_locale.c
endif
efreet_spec_test_LDADD = $(top_builddir)/src/lib/libefreet.la @EINA_LIBS@
efreet_spec_test_SOURCES = \
efreet_spec_test.c
efreet_cache_test_LDADD = $(top_builddir)/src/lib/libefreet.la @EFREET_LIBS@
efreet_cache_test_SOURCES = \
ef_cache.c
if EFL_ENABLE_TESTS
check_PROGRAMS = efreet_suite
efreet_suite_SOURCES = \
efreet_suite.c \
efreet_test_efreet.c \
efreet_test_efreet_cache.c
efreet_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libefreet.la
endif
if ICON_CACHE
efreet_icon_cache_dump_LDADD = \
$(top_builddir)/src/lib/libefreet.la \
@EFREET_LIBS@
efreet_icon_cache_dump_SOURCES = \
efreet_icon_cache_dump.c
endif

@ -1,8 +0,0 @@
.deps
.libs
Makefile
Makefile.in
compare_results
ecore_alloc
efreet_alloc
efreet_menu_alloc

@ -1,15 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = \
-I. \
-I$(top_srcdir)/src/lib \
@EFREET_CFLAGS@
bin_PROGRAMS = efreet_alloc efreet_menu_alloc
efreet_menu_alloc_SOURCES = efreet_menu_alloc.c comp.h
efreet_menu_alloc_LDADD = $(top_builddir)/src/lib/libefreet.la @EFREET_LIBS@
efreet_alloc_SOURCES = efreet_alloc.c comp.h
efreet_alloc_LDADD = $(top_builddir)/src/lib/libefreet.la @EFREET_LIBS@

@ -1,527 +0,0 @@
#ifndef COMP_H
#define COMP_H
#define LOOPS 1000
#define THEME "Tango"
#define SIZE 16
#define ADDRESS_BOOK_NEW "address-book-new"
#define APPLICATION_EXIT "application-exit"
#define APPOINTMENT_NEW "appointment-new"
#define CONTACT_NEW "contact-new"
#define DIALOG_APPLY "dialog-apply"
#define DIALOG_CANCEL "dialog-cancel"
#define DIALOG_CLOSE "dialog-close"
#define DIALOG_OK "dialog-ok"
#define DOCUMENT_NEW "document-new"
#define DOCUMENT_OPEN "document-open"
#define DOCUMENT_OPEN_RECENT "document-open-recent"
#define DOCUMENT_PAGE_SETUP "document-page-setup"
#define DOCUMENT_PRINT "document-print"
#define DOCUMENT_PRINT_PREVIEW "document-print-preview"
#define DOCUMENT_PROPERTIES "document-properties"
#define DOCUMENT_REVERT "document-revert"
#define DOCUMENT_SAVE "document-save"
#define DOCUMENT_SAVE_AS "document-save-as"
#define EDIT_COPY "edit-copy"
#define EDIT_CUT "edit-cut"
#define EDIT_DELETE "edit-delete"
#define EDIT_FIND "edit-find"
#define EDIT_FIND_REPLACE "edit-find-replace"
#define EDIT_PASTE "edit-paste"
#define EDIT_REDO "edit-redo"
#define EDIT_SELECT_ALL "edit-select-all"
#define EDIT_UNDO "edit-undo"
#define FORMAT_INDENT_LESS "format-indent-less"
#define FORMAT_INDENT_MORE "format-indent-more"
#define FORMAT_JUSTIFY_CENTER "format-justify-center"
#define FORMAT_JUSTIFY_FILL "format-justify-fill"
#define FORMAT_JUSTIFY_LEFT "format-justify-left"
#define FORMAT_JUSTIFY_RIGHT "format-justify-right"
#define FORMAT_TEXT_DIRECTION_LTR "format-text-direction-ltr"
#define FORMAT_TEXT_DIRECTION_RTL "format-text-direction-rtl"
#define FORMAT_TEXT_BOLD "format-text-bold"
#define FORMAT_TEXT_ITALIC "format-text-italic"
#define FORMAT_TEXT_UNDERLINE "format-text-underline"
#define FORMAT_TEXT_STRIKETHROUGH "format-text-strikethrough"
#define GO_BOTTOM "go-bottom"
#define GO_DOWN "go-down"
#define GO_FIRST "go-first"
#define GO_HOME "go-home"
#define GO_JUMP "go-jump"
#define GO_LAST "go-last"
#define GO_NEXT "go-next"
#define GO_PREVIOUS "go-previous"
#define GO_TOP "go-top"
#define GO_UP "go-up"
#define HELP_ABOUT "help-about"
#define HELP_CONTENTS "help-contents"
#define HELP_FAQ "help-faq"
#define INSERT_IMAGE "insert-image"
#define INSERT_LINK "insert-link"
#define INSERT_OBJECT "insert-object"
#define INSERT_TEXT "insert-text"
#define LIST_ADD "list-add"
#define LIST_REMOVE "list-remove"
#define MAIL_FORWARD "mail-forward"
#define MAIL_MARK_IMPORTANT "mail-mark-important"
#define MAIL_MARK_JUNK "mail-mark-junk"
#define MAIL_MARK_NOTJUNK "mail-mark-notjunk"
#define MAIL_MARK_READ "mail-mark-read"
#define MAIL_MARK_UNREAD "mail-mark-unread"
#define MAIL_MESSAGE_NEW "mail-message-new"
#define MAIL_REPLY_ALL "mail-reply-all"
#define MAIL_REPLY_SENDER "mail-reply-sender"
#define MAIL_SEND_RECEIVE "mail-send-receive"
#define MEDIA_EJECT "media-eject"
#define MEDIA_PLAYBACK_PAUSE "media-playback-pause"
#define MEDIA_PLAYBACK_START "media-playback-start"
#define MEDIA_PLAYBACK_STOP "media-playback-stop"
#define MEDIA_RECORD "media-record"
#define MEDIA_SEEK_BACKWARD "media-seek-backward"
#define MEDIA_SEEK_FORWARD "media-seek-forward"
#define MEDIA_SKIP_BACKWARD "media-skip-backward"
#define MEDIA_SKIP_FORWARD "media-skip-forward"
#define SYSTEM_LOCK_SCREEN "system-lock-screen"
#define SYSTEM_LOG_OUT "system-log-out"
#define SYSTEM_RUN "system-run"
#define SYSTEM_SEARCH "system-search"
#define TOOLS_CHECK_SPELLING "tools-check-spelling"
#define VIEW_FULLSCREEN "view-fullscreen"
#define VIEW_REFRESH "view-refresh"
#define VIEW_SORT_ASCENDING "view-sort-ascending"
#define VIEW_SORT_DESCENDING "view-sort-descending"
#define WINDOW_CLOSE "window-close"
#define WINDOW_NEW "window-new"
#define ZOOM_BEST_FIT "zoom-best-fit"
#define ZOOM_IN "zoom-in"
#define ZOOM_ORIGINAL "zoom-original"
#define ZOOM_OUT "zoom-out"
#define PROCESS_WORKING "process-working"
#define ACCESSORIES_CALCULATOR "accessories-calculator"
#define ACCESSORIES_CHARACTER_MAP "accessories-character-map"
#define ACCESSORIES_DICTIONARY "accessories-dictionary"
#define ACCESSORIES_TEXT_EDITOR "accessories-text-editor"
#define HELP_BROWSER "help-browser"
#define MULTIMEDIA_VOLUME_CONTROL "multimedia-volume-control"
#define PREFERENCES_DESKTOP_ACCESSIBILITY "preferences-desktop-accessibility"
#define PREFERENCES_DESKTOP_FONT "preferences-desktop-font"
#define PREFERENCES_DESKTOP_KEYBOARD "preferences-desktop-keyboard"
#define PREFERENCES_DESKTOP_LOCALE "preferences-desktop-locale"
#define PREFERENCES_DESKTOP_MULTIMEDIA "preferences-desktop-multimedia"
#define PREFERENCES_DESKTOP_SCREENSAVER "preferences-desktop-screensaver"
#define PREFERENCES_DESKTOP_THEME "preferences-desktop-theme"
#define PREFERENCES_DESKTOP_WALLPAPER "preferences-desktop-wallpaper"
#define SYSTEM_FILE_MANAGER "system-file-manager"
#define SYSTEM_SOFTWARE_UPDATE "system-software-update"
#define UTILITIES_TERMINAL "utilities-terminal"
#define APPLICATIONS_ACCESSORIES "applications-accessories"
#define APPLICATIONS_DEVELOPMENT "applications-development"
#define APPLICATIONS_GAMES "applications-games"
#define APPLICATIONS_GRAPHICS "applications-graphics"
#define APPLICATIONS_INTERNET "applications-internet"
#define APPLICATIONS_MULTIMEDIA "applications-multimedia"
#define APPLICATIONS_OFFICE "applications-office"
#define APPLICATIONS_OTHER "applications-other"
#define APPLICATIONS_SYSTEM "applications-system"
#define APPLICATIONS_UTILITIES "applications-utilities"
#define PREFERENCES_DESKTOP "preferences-desktop"
#define PREFERENCES_DESKTOP_ACCESSIBILITY "preferences-desktop-accessibility"
#define PREFERENCES_DESKTOP_PERIPHERALS "preferences-desktop-peripherals"
#define PREFERENCES_DESKTOP_PERSONAL "preferences-desktop-personal"
#define PREFERENCES_OTHER "preferences-other"
#define PREFERENCES_SYSTEM "preferences-system"
#define PREFERENCES_SYSTEM_NETWORK "preferences-system-network"
#define SYSTEM_HELP "system-help"
#define AUDIO_CARD "audio-card"
#define AUDIO_INPUT_MICROPHONE "audio-input-microphone"
#define BATTERY "battery"
#define CAMERA_PHOTO "camera-photo"
#define CAMERA_VIDEO "camera-video"
#define COMPUTER "computer"
#define DRIVE_CDROM "drive-cdrom"
#define DRIVE_HARDDISK "drive-harddisk"
#define DRIVE_REMOVABLE_MEDIA "drive-removable-media"
#define INPUT_GAMING "input-gaming"
#define INPUT_KEYBOARD "input-keyboard"
#define INPUT_MOUSE "input-mouse"
#define MEDIA_CDROM "media-cdrom"
#define MEDIA_FLOPPY "media-floppy"
#define MULTIMEDIA_PLAYER "multimedia-player"
#define NETWORK_WIRED "network-wired"
#define NETWORK_WIRELESS "network-wireless"
#define PRINTER "printer"
#define EMBLEM_DEFAULT "emblem-default"
#define EMBLEM_DOCUMENTS "emblem-documents"
#define EMBLEM_DOWNLOADS "emblem-downloads"
#define EMBLEM_FAVORITE "emblem-favorite"
#define EMBLEM_IMPORTANT "emblem-important"
#define EMBLEM_MAIL "emblem-mail"
#define EMBLEM_PHOTOS "emblem-photos"
#define EMBLEM_READONLY "emblem-readonly"
#define EMBLEM_SHARED "emblem-shared"
#define EMBLEM_SYMBOLIC_LINK "emblem-symbolic-link"
#define EMBLEM_SYNCHRONIZED "emblem-synchronized"
#define EMBLEM_SYSTEM "emblem-system"
#define EMBLEM_UNREADABLE "emblem-unreadable"
#define FACE_ANGEL "face-angel"
#define FACE_CRYING "face-crying"
#define FACE_DEVIL_GRIN "face-devil-grin"
#define FACE_DEVIL_SAD "face-devil-sad"
#define FACE_GLASSES "face-glasses"
#define FACE_KISS "face-kiss"
#define FACE_MONKEY "face-monkey"
#define FACE_PLAIN "face-plain"
#define FACE_SAD "face-sad"
#define FACE_SMILE "face-smile"
#define FACE_SMILE_BIG "face-smile-big"
#define FACE_SMIRK "face-smirk"
#define FACE_SURPRISE "face-surprise"
#define FACE_WINK "face-wink"
#define APPLICATION_X_EXECUTABLE "application-x-executable"
#define AUDIO_X_GENERIC "audio-x-generic"
#define FONT_X_GENERIC "font-x-generic"
#define IMAGE_X_GENERIC "image-x-generic"
#define PACKAGE_X_GENERIC "package-x-generic"
#define TEXT_HTML "text-html"
#define TEXT_X_GENERIC "text-x-generic"
#define TEXT_X_GENERIC_TEMPLATE "text-x-generic-template"
#define TEXT_X_SCRIPT "text-x-script"
#define VIDEO_X_GENERIC "video-x-generic"
#define X_OFFICE_ADDRESS_BOOK "x-office-address-book"
#define X_OFFICE_CALENDAR "x-office-calendar"
#define X_OFFICE_DOCUMENT "x-office-document"
#define X_OFFICE_PRESENTATION "x-office-presentation"
#define X_OFFICE_SPREADSHEET "x-office-spreadsheet"
#define FOLDER "folder"
#define FOLDER_REMOTE "folder-remote"
#define NETWORK_SERVER "network-server"
#define NETWORK_WORKGROUP "network-workgroup"
#define START_HERE "start-here"
#define USER_DESKTOP "user-desktop"
#define USER_HOME "user-home"
#define USER_TRASH "user-trash"
#define APPOINTMENT_MISSED "appointment-missed"
#define APPOINTMENT_SOON "appointment-soon"
#define AUDIO_VOLUME_HIGH "audio-volume-high"
#define AUDIO_VOLUME_LOW "audio-volume-low"
#define AUDIO_VOLUME_MEDIUM "audio-volume-medium"
#define AUDIO_VOLUME_MUTED "audio-volume-muted"
#define BATTERY_CAUTION "battery-caution"
#define BATTERY_LOW "battery-low"
#define DIALOG_ERROR "dialog-error"
#define DIALOG_INFORMATION "dialog-information"
#define DIALOG_PASSWORD "dialog-password"
#define DIALOG_QUESTION "dialog-question"
#define DIALOG_WARNING "dialog-warning"
#define FOLDER_DRAG_ACCEPT "folder-drag-accept"
#define FOLDER_OPEN "folder-open"
#define FOLDER_VISITING "folder-visiting"
#define IMAGE_LOADING "image-loading"
#define IMAGE_MISSING "image-missing"
#define MAIL_ATTACHMENT "mail-attachment"
#define MAIL_UNREAD "mail-unread"
#define MAIL_READ "mail-read"
#define MAIL_REPLIED "mail-replied"
#define MAIL_SIGNED "mail-signed"
#define MAIL_SIGNED_VERIFIED "mail-signed-verified"
#define MEDIA_PLAYLIST_REPEAT "media-playlist-repeat"
#define MEDIA_PLAYLIST_SHUFFLE "media-playlist-shuffle"
#define NETWORK_ERROR "network-error"
#define NETWORK_IDLE "network-idle"
#define NETWORK_OFFLINE "network-offline"
#define NETWORK_RECEIVE "network-receive"
#define NETWORK_TRANSMIT "network-transmit"
#define NETWORK_TRANSMIT_RECEIVE "network-transmit-receive"
#define PRINTER_ERROR "printer-error"
#define PRINTER_PRINTING "printer-printing"
#define SOFTWARE_UPDATE_AVAILABLE "software-update-available"
#define SOFTWARE_UPDATE_URGENT "software-update-urgent"
#define SYNC_ERROR "sync-error"
#define SYNC_SYNCHRONIZING "sync-synchronizing"
#define TASK_DUE "task-due"
#define TASK_PASSED_DUE "task-passed-due"
#define USER_AWAY "user-away"
#define USER_IDLE "user-idle"
#define USER_OFFLINE "user-offline"
#define USER_ONLINE "user-online"
#define USER_TRASH_FULL "user-trash-full"
#define WEATHER_CLEAR "weather-clear"
#define WEATHER_CLEAR_NIGHT "weather-clear-night"
#define WEATHER_FEW_CLOUDS "weather-few-clouds"
#define WEATHER_FEW_CLOUDS_NIGHT "weather-few-clouds-night"
#define WEATHER_FOG "weather-fog"
#define WEATHER_OVERCAST "weather-overcast"
#define WEATHER_SEVERE_ALERT "weather-severe-alert"
#define WEATHER_SHOWERS "weather-showers"
#define WEATHER_SHOWERS_SCATTERED "weather-showers-scattered"
#define WEATHER_SNOW "weather-snow"
#define WEATHER_STORM "weather-storm"
const char *icons[] = {
ADDRESS_BOOK_NEW,
APPLICATION_EXIT,
APPOINTMENT_NEW,
CONTACT_NEW,
DIALOG_APPLY,
DIALOG_CANCEL,
DIALOG_CLOSE,
DIALOG_OK,
DOCUMENT_NEW,
DOCUMENT_OPEN,
DOCUMENT_OPEN_RECENT,
DOCUMENT_PAGE_SETUP,
DOCUMENT_PRINT,
DOCUMENT_PRINT_PREVIEW,
DOCUMENT_PROPERTIES,
DOCUMENT_REVERT,
DOCUMENT_SAVE,
DOCUMENT_SAVE_AS,
EDIT_COPY,
EDIT_CUT,
EDIT_DELETE,
EDIT_FIND,
EDIT_FIND_REPLACE,
EDIT_PASTE,
EDIT_REDO,
EDIT_SELECT_ALL,
EDIT_UNDO,
FORMAT_INDENT_LESS,
FORMAT_INDENT_MORE,
FORMAT_JUSTIFY_CENTER,
FORMAT_JUSTIFY_FILL,
FORMAT_JUSTIFY_LEFT,
FORMAT_JUSTIFY_RIGHT,
FORMAT_TEXT_DIRECTION_LTR,
FORMAT_TEXT_DIRECTION_RTL,
FORMAT_TEXT_BOLD,
FORMAT_TEXT_ITALIC,
FORMAT_TEXT_UNDERLINE,
FORMAT_TEXT_STRIKETHROUGH,
GO_BOTTOM,
GO_DOWN,
GO_FIRST,
GO_HOME,
GO_JUMP,
GO_LAST,
GO_NEXT,
GO_PREVIOUS,
GO_TOP,
GO_UP,
HELP_ABOUT,
HELP_CONTENTS,
HELP_FAQ,
INSERT_IMAGE,
INSERT_LINK,
INSERT_OBJECT,
INSERT_TEXT,
LIST_ADD,
LIST_REMOVE,
MAIL_FORWARD,
MAIL_MARK_IMPORTANT,
MAIL_MARK_JUNK,
MAIL_MARK_NOTJUNK,
MAIL_MARK_READ,
MAIL_MARK_UNREAD,
MAIL_MESSAGE_NEW,
MAIL_REPLY_ALL,
MAIL_REPLY_SENDER,
MAIL_SEND_RECEIVE,
MEDIA_EJECT,
MEDIA_PLAYBACK_PAUSE,
MEDIA_PLAYBACK_START,
MEDIA_PLAYBACK_STOP,
MEDIA_RECORD,
MEDIA_SEEK_BACKWARD,
MEDIA_SEEK_FORWARD,
MEDIA_SKIP_BACKWARD,
MEDIA_SKIP_FORWARD,
SYSTEM_LOCK_SCREEN,
SYSTEM_LOG_OUT,
SYSTEM_RUN,
SYSTEM_SEARCH,
TOOLS_CHECK_SPELLING,
VIEW_FULLSCREEN,
VIEW_REFRESH,
VIEW_SORT_ASCENDING,
VIEW_SORT_DESCENDING,
WINDOW_CLOSE,
WINDOW_NEW,
ZOOM_BEST_FIT,
ZOOM_IN,
ZOOM_ORIGINAL,
ZOOM_OUT,
PROCESS_WORKING,
ACCESSORIES_CALCULATOR,
ACCESSORIES_CHARACTER_MAP,
ACCESSORIES_DICTIONARY,
ACCESSORIES_TEXT_EDITOR,
HELP_BROWSER,
MULTIMEDIA_VOLUME_CONTROL,
PREFERENCES_DESKTOP_ACCESSIBILITY,
PREFERENCES_DESKTOP_FONT,
PREFERENCES_DESKTOP_KEYBOARD,
PREFERENCES_DESKTOP_LOCALE,
PREFERENCES_DESKTOP_MULTIMEDIA,
PREFERENCES_DESKTOP_SCREENSAVER,
PREFERENCES_DESKTOP_THEME,
PREFERENCES_DESKTOP_WALLPAPER,
SYSTEM_FILE_MANAGER,
SYSTEM_SOFTWARE_UPDATE,
UTILITIES_TERMINAL,
APPLICATIONS_ACCESSORIES,
APPLICATIONS_DEVELOPMENT,
APPLICATIONS_GAMES,
APPLICATIONS_GRAPHICS,
APPLICATIONS_INTERNET,
APPLICATIONS_MULTIMEDIA,
APPLICATIONS_OFFICE,
APPLICATIONS_OTHER,
APPLICATIONS_SYSTEM,
APPLICATIONS_UTILITIES,
PREFERENCES_DESKTOP,
PREFERENCES_DESKTOP_ACCESSIBILITY,
PREFERENCES_DESKTOP_PERIPHERALS,
PREFERENCES_DESKTOP_PERSONAL,
PREFERENCES_OTHER,
PREFERENCES_SYSTEM,
PREFERENCES_SYSTEM_NETWORK,
SYSTEM_HELP,
AUDIO_CARD,
AUDIO_INPUT_MICROPHONE,
BATTERY,
CAMERA_PHOTO,
CAMERA_VIDEO,
COMPUTER,
DRIVE_CDROM,
DRIVE_HARDDISK,
DRIVE_REMOVABLE_MEDIA,
INPUT_GAMING,
INPUT_KEYBOARD,
INPUT_MOUSE,
MEDIA_CDROM,
MEDIA_FLOPPY,
MULTIMEDIA_PLAYER,
NETWORK_WIRED,
NETWORK_WIRELESS,
PRINTER,
EMBLEM_DEFAULT,
EMBLEM_DOCUMENTS,
EMBLEM_DOWNLOADS,
EMBLEM_FAVORITE,
EMBLEM_IMPORTANT,
EMBLEM_MAIL,
EMBLEM_PHOTOS,
EMBLEM_READONLY,
EMBLEM_SHARED,
EMBLEM_SYMBOLIC_LINK,
EMBLEM_SYNCHRONIZED,
EMBLEM_SYSTEM,
EMBLEM_UNREADABLE,
FACE_ANGEL,
FACE_CRYING,
FACE_DEVIL_GRIN,
FACE_DEVIL_SAD,
FACE_GLASSES,
FACE_KISS,
FACE_MONKEY,
FACE_PLAIN,
FACE_SAD,
FACE_SMILE,
FACE_SMILE_BIG,
FACE_SMIRK,
FACE_SURPRISE,
FACE_WINK,
APPLICATION_X_EXECUTABLE,
AUDIO_X_GENERIC,
FONT_X_GENERIC,
IMAGE_X_GENERIC,
PACKAGE_X_GENERIC,
TEXT_HTML,
TEXT_X_GENERIC,
TEXT_X_GENERIC_TEMPLATE,
TEXT_X_SCRIPT,
VIDEO_X_GENERIC,
X_OFFICE_ADDRESS_BOOK,
X_OFFICE_CALENDAR,
X_OFFICE_DOCUMENT,
X_OFFICE_PRESENTATION,
X_OFFICE_SPREADSHEET,
FOLDER,
FOLDER_REMOTE,
NETWORK_SERVER,
NETWORK_WORKGROUP,
START_HERE,
USER_DESKTOP,
USER_HOME,
USER_TRASH,
APPOINTMENT_MISSED,
APPOINTMENT_SOON,
AUDIO_VOLUME_HIGH,
AUDIO_VOLUME_LOW,
AUDIO_VOLUME_MEDIUM,
AUDIO_VOLUME_MUTED,
BATTERY_CAUTION,
BATTERY_LOW,
DIALOG_ERROR,
DIALOG_INFORMATION,
DIALOG_PASSWORD,
DIALOG_QUESTION,
DIALOG_WARNING,
FOLDER_DRAG_ACCEPT,
FOLDER_OPEN,
FOLDER_VISITING,
IMAGE_LOADING,
IMAGE_MISSING,
MAIL_ATTACHMENT,
MAIL_UNREAD,
MAIL_READ,
MAIL_REPLIED,
MAIL_SIGNED,
MAIL_SIGNED_VERIFIED,
MEDIA_PLAYLIST_REPEAT,
MEDIA_PLAYLIST_SHUFFLE,
NETWORK_ERROR,
NETWORK_IDLE,
NETWORK_OFFLINE,
NETWORK_RECEIVE,
NETWORK_TRANSMIT,
NETWORK_TRANSMIT_RECEIVE,
PRINTER_ERROR,
PRINTER_PRINTING,
SOFTWARE_UPDATE_AVAILABLE,
SOFTWARE_UPDATE_URGENT,
SYNC_ERROR,
SYNC_SYNCHRONIZING,
TASK_DUE,
TASK_PASSED_DUE,
USER_AWAY,
USER_IDLE,
USER_OFFLINE,
USER_ONLINE,
USER_TRASH_FULL,
WEATHER_CLEAR,
WEATHER_CLEAR_NIGHT,
WEATHER_FEW_CLOUDS,
WEATHER_FEW_CLOUDS_NIGHT,
WEATHER_FOG,
WEATHER_OVERCAST,
WEATHER_SEVERE_ALERT,
WEATHER_SHOWERS,
WEATHER_SHOWERS_SCATTERED,
WEATHER_SNOW,
WEATHER_STORM,
NULL
};
#endif

@ -1,27 +0,0 @@
#include <Efreet.h>
#include <stdio.h>
#include <stdlib.h>
#include "comp.h"
int
main(void)
{
int i = 0, k;
const char *path;
efreet_init();
for (k = 0; k < LOOPS; k++)
{
for (i = 0; icons[i]; i++)
{
path = efreet_icon_path_find(THEME, icons[i], SIZE);
// printf("%s: %s\n", icons[i], (path ? path : "NOT FOUND"));
}
}
efreet_shutdown();
return 0;
}

@ -1,23 +0,0 @@
#include <Efreet.h>
#include <stdio.h>
#include "comp.h"
int
main(void)
{
int k;
efreet_init();
for (k = 0; k < LOOPS; k++)
{
Efreet_Menu *menu;
menu = efreet_menu_get();
efreet_menu_free(menu);
}
efreet_shutdown();
return 0;
}

@ -1,2 +0,0 @@
Makefile
Makefile.in

@ -1,18 +0,0 @@
SUBDIRS = sub
MAINTAINERCLEANFILES = Makefile.in
testdir = $(pkgdatadir)/test
test_DATA = \
test.ini \
long.ini \
test.desktop \
test_type.desktop \
test.menu \
test_menu_slash_bad.menu \
entry.png \
entry \
preferences.menu \
test_garbage
EXTRA_DIST = $(test_DATA)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

File diff suppressed because one or more lines are too long

@ -1,41 +0,0 @@
<!DOCTYPE Menu PUBLIC
"-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
<Name>Preferences</Name>
<Directory>Preferences.directory</Directory>
<AppDir>blah</AppDir>
<AppDir>/var/tmp</AppDir>
<Move>
<Old>Blah</Old
<New>Borp</New>
</Move>
<Menu>
<Name>House</Name>
<Directory>House.directory</Directory>
<Include>
<Category>House</Category>
<Category>Garden</Category>
</Include>
</Menu>
<Menu>
<Name>Mouse</Name>
<Directory>House.directory</Directory>
<Include>
<Category>House</Category>
<Category>Garden</Category>
</Include>
</Menu>
<Menu>
<Name>House</Name>
<Directory>House.directory</Directory>
<Include>
<Category>Cat</Category>
</Include>
</Menu>
</Menu>

@ -1,8 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
testdir = $(pkgdatadir)/test/sub
test_DATA = \
test.desktop
EXTRA_DIST = $(test_DATA)

@ -1,5 +0,0 @@
[Desktop Entry]
Type=Application
Name=Sub
Exec=subtest
Categories=Test

@ -1,8 +0,0 @@
[Desktop Entry]
Type=Application
Name=Efreet Test Application
GenericName=Test Application
Exec=efreet_test %F %i
Categories=Test;Enlightenment;
Icon=TestIcon
X-Test=Own key

@ -1,21 +0,0 @@
# Comments should be ignored (and empty lines)
[contact]
Name=Foo Bar
Name[en_US]=English Foo Bar
Email= foo@bar.com
Email[de_DE] = foo@bar.de
Age = 30
TrueBoolean=true
FalseBoolean=false
InvalidBoolean=invalid
Escaped=line1\nline2\r\nline3\ttabbed \\ with a backslash\sand\sspaces
[AIM]
Username=foobar
# the next line has a single space. it should be skipped as well
[Jabber]
Username=foobar@bar.de

@ -1,52 +0,0 @@
<!DOCTYPE Menu PUBLIC
"-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
<Name>Applications</Name>
<Directory>Applications.directory</Directory>
<DefaultAppDirs/>
<DefaultDirectoryDirs/>
<MergeDir>applications-merged</MergeDir>
<LegacyDir>/usr/share/applnk</LegacyDir>
<DefaultLayout>
<Merge type="menus"/>
<Merge type="files"/>
<Separator/>
<Menuname>More</Menuname>
</DefaultLayout>
<Move>
<Old>Foo</Old>
<New>Bar</New>
<Old>Foo2</Old>
<New>Bar2</New>
</Move>
<Menu>
<Name>Preferences</Name>
<Directory>Preferences.directory</Directory>
<MergeFile>preferences.menu</MergeFile>
</Menu>
<Menu>
<Name>Office</Name>
<Directory>Office.directory</Directory>
<Include>
<Category>Office</Category>
</Include>
<Exclude>
<Filename>foo.desktop</Filename>
<And>
<Not>
<Filename>bar.desktop</Filename>
</Not>
</And>
</Exclude>
</Menu>
</Menu>

File diff suppressed because it is too large Load Diff

@ -1,14 +0,0 @@
<!DOCTYPE Menu PUBLIC
"-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
<Name>Applications</Name>
<Directory>Applications.directory</Directory>
<!-- a comment
<!-- with a comment -->
<Or> This should be commented </Or>
-->
</Menu>

@ -1,11 +0,0 @@
<!DOCTYPE Menu PUBLIC
"-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
<Name>Applications/Bar</Name>
<Menu>
<Name>Preferences/Baz</Name>
</Menu>
</Menu>

@ -1,8 +0,0 @@
[Desktop Entry]
Type=My_Type
Name=Efreet Test Application
GenericName=Test Application
Exec=efreet_test %F %i
Categories=Test;Enlightenment;
Icon=TestIcon
X-Test=Own key

@ -1,143 +0,0 @@
#include "Efreet.h"
#include <stdio.h>
#include <Ecore.h>
#include "ef_test.h"
#if 0
EAPI Efreet_Desktop *efreet_util_desktop_file_id_find(const char *file_id);
EAPI Eina_List *efreet_util_desktop_generic_name_glob_list(const char *glob);
EAPI Eina_List *efreet_util_desktop_comment_glob_list(const char *glob);
#endif
static void
check(void)
{
Eina_List *list;
Efreet_Desktop *desktop;
double start;
const char *id;
// EAPI char *efreet_util_path_to_file_id(const char *path);
start = ecore_time_get();
id = efreet_util_path_to_file_id("/usr/share/applications/gnome-panel.desktop");
if (id)
{
printf("efreet_util_path_to_file_id(/usr/share/applications/gnome-panel.desktop): %s %.6f\n", id, (ecore_time_get() - start));
}
else
printf("efreet_util_path_to_file_id(/usr/share/applications/gnome-panel.desktop): NULL %.6f\n", (ecore_time_get() - start));
//EAPI Efreet_Desktop *efreet_util_desktop_name_find(const char *name);
start = ecore_time_get();
desktop = efreet_util_desktop_name_find("Evolution");
if (desktop)
printf("efreet_util_desktop_name_find(Evolution): %s %.6f\n", desktop->orig_path, (ecore_time_get() - start));
else
printf("efreet_util_desktop_name_find(Evolution): NULL %.6f\n", (ecore_time_get() - start));
efreet_desktop_free(desktop);
//EAPI Efreet_Desktop *efreet_util_desktop_generic_name_find(const char *generic_name);
start = ecore_time_get();
desktop = efreet_util_desktop_generic_name_find("Spreadsheet");
if (desktop)
printf("efreet_util_desktop_generic_name_find(Spreadsheet): %s %.6f\n", desktop->orig_path, (ecore_time_get() - start));
else
printf("efreet_util_desktop_generic_name_find(Spreadsheet): NULL %.6f\n", (ecore_time_get() - start));
efreet_desktop_free(desktop);
//EAPI Efreet_Desktop *efreet_util_desktop_wm_class_find(const char *wmname, const char *wmclass);
start = ecore_time_get();
desktop = efreet_util_desktop_wm_class_find("Firefox", NULL);
if (desktop)
printf("efreet_util_desktop_wm_class_find(Firefox): %s %.6f\n", desktop->orig_path, (ecore_time_get() - start));
else
printf("efreet_util_desktop_wm_class_find(Firefox): NULL %.6f\n", (ecore_time_get() - start));
efreet_desktop_free(desktop);
//EAPI Efreet_Desktop *efreet_util_desktop_exec_find(const char *exec);
start = ecore_time_get();
desktop = efreet_util_desktop_exec_find("/usr/bin/update-manager");
if (desktop)
printf("efreet_util_desktop_exec_find(update-manager): %s %.6f\n", desktop->orig_path, (ecore_time_get() - start));
else
printf("efreet_util_desktop_exec_find(update-manager): NULL %.6f\n", (ecore_time_get() - start));
efreet_desktop_free(desktop);
//EAPI Eina_List *efreet_util_desktop_name_glob_list(const char *glob);
start = ecore_time_get();
list = efreet_util_desktop_name_glob_list("Ubuntu*");
if (list)
{
EINA_LIST_FREE(list, desktop)
{
printf("efreet_util_desktop_name_glob_list(Ubuntu*): %s\n", desktop->name);
efreet_desktop_free(desktop);
}
}
printf("time: %.6f\n", (ecore_time_get() - start));
//EAPI Eina_List *efreet_util_desktop_mime_list(const char *mime);
start = ecore_time_get();
list = efreet_util_desktop_mime_list("application/ogg");
if (list)
{
EINA_LIST_FREE(list, desktop)
{
printf("efreet_util_desktop_mime_list(application/ogg): %s\n", desktop->name);
efreet_desktop_free(desktop);
}
}
printf("time: %.6f\n", (ecore_time_get() - start));
//EAPI Eina_List *efreet_util_desktop_exec_glob_list(const char *glob);
start = ecore_time_get();
list = efreet_util_desktop_exec_glob_list("*gnome*");
if (list)
{
EINA_LIST_FREE(list, desktop)
{
printf("efreet_util_desktop_exec_glob_list(*gnome*): %s\n", desktop->exec);
efreet_desktop_free(desktop);
}
}
printf("time: %.6f\n", (ecore_time_get() - start));
//EAPI Eina_List *efreet_util_desktop_categories_list(void);
start = ecore_time_get();
list = efreet_util_desktop_categories_list();
if (list)
{
EINA_LIST_FREE(list, id)
{
printf("efreet_util_desktop_categories_list(): %s\n", id);
}
}
printf("time: %.6f\n", (ecore_time_get() - start));
//EAPI Eina_List *efreet_util_desktop_category_list(const char *category);
start = ecore_time_get();
list = efreet_util_desktop_category_list("Graphics");
if (list)
{
EINA_LIST_FREE(list, desktop)
{
printf("efreet_util_desktop_category_list(Graphics): %s\n", desktop->name);
efreet_desktop_free(desktop);
}
}
printf("time: %.6f\n", (ecore_time_get() - start));
desktop = efreet_desktop_get("/opt/google/chrome/google-chrome.desktop");
if (desktop) efreet_desktop_free(desktop);
}
int
main(int argc __UNUSED__, char **argv __UNUSED__)
{
if (!efreet_init()) return 1;
check();
ecore_main_loop_begin();
efreet_shutdown();
return 0;
}

@ -1,307 +0,0 @@
#include "Efreet.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int
ef_cb_efreet_data_home(void)
{
const char *tmp;
int ret = 1;
efreet_shutdown();
setenv("XDG_DATA_HOME", "/var/tmp", 1);
efreet_init();
tmp = efreet_data_home_get();
if (strcmp(tmp, "/var/tmp"))
{
printf("efreet_data_home_get() returned incorrect "
"value (%s) on XDG_DATA_HOME=/var/tmp\n", tmp);
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
unsetenv("XDG_DATA_HOME");
setenv("HOME", "/home/tmp", 1);
efreet_init();
tmp = efreet_data_home_get();
if (strcmp(tmp, "/home/tmp/.local/share"))
{
printf("efreet_data_home_get() returned incorrect "
"value (%s) on blank XDG_DATA_HOME\n", tmp);
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
unsetenv("XDG_DATA_HOME");
unsetenv("HOME");
#ifdef _WIN32
unsetenv("USERPROFILE");
#endif
efreet_init();
tmp = efreet_data_home_get();
if (strcmp(tmp, "/tmp/.local/share"))
{
printf("efreet_data_home_get() returned incorrect "
"value (%s) on blank XDG_DATA_HOME and blank HOME\n", tmp);
ret = 0;
}
return ret;
}
int
ef_cb_efreet_config_home(void)
{
const char *tmp;
int ret = 1;
efreet_shutdown();
setenv("XDG_CONFIG_HOME", "/var/tmp", 1);
efreet_init();
tmp = efreet_config_home_get();
if (strcmp(tmp, "/var/tmp"))
{
printf("efreet_config_home_get() returned incorrect "
"value (%s) on XDG_CONFIG_HOME=/var/tmp\n", tmp);
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
unsetenv("XDG_CONFIG_HOME");
setenv("HOME", "/home/tmp", 1);
efreet_init();
tmp = efreet_config_home_get();
if (strcmp(tmp, "/home/tmp/.config"))
{
printf("efreet_config_home_get() returned incorrect "
"value (%s) on blank XDG_CONFIG_HOME\n", tmp);
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
unsetenv("XDG_CONFIG_HOME");
unsetenv("HOME");
#ifdef _WIN32
unsetenv("USERPROFILE");
#endif
efreet_init();
tmp = efreet_config_home_get();
if (strcmp(tmp, "/tmp/.config"))
{
printf("efreet_config_home_get() returned incorrect "
"value (%s) on blank XDG_CONFIG_HOME and blank HOME\n", tmp);
ret = 0;
}
return ret;
}
int
ef_cb_efreet_cache_home(void)
{
const char *tmp;
int ret = 1;
efreet_shutdown();
setenv("XDG_CACHE_HOME", "/var/tmp", 1);
efreet_init();
tmp = efreet_cache_home_get();
if (strcmp(tmp, "/var/tmp"))
{
printf("efreet_cache_home_get() returned incorrect "
"value (%s) on XDG_CACHE_HOME=/var/tmp\n", tmp);
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
unsetenv("XDG_CACHE_HOME");
setenv("HOME", "/home/tmp", 1);
efreet_init();
tmp = efreet_cache_home_get();
if (strcmp(tmp, "/home/tmp/.cache"))
{
printf("efreet_cache_home_get() returned incorrect "
"value (%s) on blank XDG_CACHE_HOME\n", tmp);
ret = 0;
}
/* reset efreet here so we can set a new home dir */
efreet_shutdown();
unsetenv("XDG_CACHE_HOME");
unsetenv("HOME");
#ifdef _WIN32
unsetenv("USERPROFILE");
#endif
efreet_init();
tmp = efreet_cache_home_get();
if (strcmp(tmp, "/tmp/.cache"))
{
printf("efreet_cache_home_get() returned incorrect "
"value (%s) on blank XDG_CACHE_HOME and blank HOME\n", tmp);
ret = 0;
}
return ret;
}
int
ef_cb_efreet_data_dirs(void)
{
Eina_List *tmp, *l;
int ret = 1, i;
char dirs[128], *val;
char *vals[] = {"/var/tmp/a", "/tmp/b", "/usr/local/share", "/etc", NULL};
char *def_vals[] = {PACKAGE_DATA_DIR, "/usr/share", "/usr/local/share", NULL};
dirs[0] = '\0';
for (i = 0; vals[i]; i++)
{
if (i > 0) strcat(dirs, ":");
strcat(dirs, vals[i]);
}
efreet_shutdown();
setenv("XDG_DATA_DIRS", dirs, 1);
efreet_init();
i = 0;
tmp = efreet_data_dirs_get();
EINA_LIST_FOREACH(tmp, l, val)
{
if (!vals[i])
{
printf("efreet_data_dirs_get() returned more values then it "
"should have given %s as input\n", dirs);
ret = 0;
break;
}
if (strcmp(val, vals[i]))
{
printf("efreet_data_dirs_get() returned incorrect value (%s) when "
"%s set\n", val, dirs);
ret = 0;
}
i++;
}
efreet_shutdown();
unsetenv("XDG_DATA_DIRS");
efreet_init();
i = 0;
tmp = efreet_data_dirs_get();
if (eina_list_count(tmp) != 3)
{
printf("efreet_data_dirs_get() nodes is differnet from expected default\n");
ret = 0;
}
EINA_LIST_FOREACH(tmp, l, val)
{
if (!def_vals[i])
{
printf("efreet_data_dirs_get() returned more values then it "
"should have given %s as input\n", dirs);
ret = 0;
break;
}
if (strcmp(val, def_vals[i]))
{
printf("efreet_data_dirs_get() returned incorrect value (%s) when "
"XDG_DATA_DIRS= is set %s\n", val, def_vals[i]);
ret = 0;
}
i++;
}
return ret;
}
int
ef_cb_efreet_config_dirs(void)
{
Eina_List *tmp, *l;
int ret = 1, i;
char dirs[128], *val;
char *vals[] = {"/var/tmp/a", "/tmp/b", "/usr/local/share", "/etc", NULL};
char *def_vals[] = {"/etc/xdg", NULL};
dirs[0] = '\0';
for (i = 0; vals[i]; i++)
{
if (i > 0) strcat(dirs, ":");
strcat(dirs, vals[i]);
}
efreet_shutdown();
setenv("XDG_CONFIG_DIRS", dirs, 1);
efreet_init();
i = 0;
tmp = efreet_config_dirs_get();
EINA_LIST_FOREACH(tmp, l, val)
{
if (!vals[i])
{
printf("efreet_config_dirs_get() returned more values then it "
"should have given %s as input\n", dirs);
ret = 0;
break;
}
if (strcmp(val, vals[i]))
{
printf("efreet_config_dirs_get() returned incorrect value (%s) when "
"%s set\n", val, dirs);
ret = 0;