diff --git a/samples/application/javascript.js b/samples/application/javascript.js new file mode 100644 index 0000000..74b8e94 --- /dev/null +++ b/samples/application/javascript.js @@ -0,0 +1 @@ +console.log("This is an example JavaScript source file"); diff --git a/samples/application/octet-stream b/samples/application/octet-stream new file mode 100644 index 0000000..474ad83 Binary files /dev/null and b/samples/application/octet-stream differ diff --git a/samples/check.sh b/samples/check.sh index 5819df9..93f6f0c 100755 --- a/samples/check.sh +++ b/samples/check.sh @@ -2,6 +2,8 @@ set -e +cd "$(dirname "$0")" + for file in */* do filetype="$(xdg-mime query filetype "${file}")" @@ -17,11 +19,10 @@ do fi default="$(xdg-mime query default "${filetype}")" - if [ -z "${default}" ] + if [ -n "${default}" ] then + echo "${file}: ${filetype}: ${default}" + else echo "${file}: ${filetype}: no default application found" - exit 1 fi - - echo "${file}: ${filetype}: ${default}" done diff --git a/samples/image/bmp.bmp b/samples/image/bmp.bmp new file mode 100644 index 0000000..1a1a77a Binary files /dev/null and b/samples/image/bmp.bmp differ diff --git a/samples/image/gif.gif b/samples/image/gif.gif new file mode 100644 index 0000000..dd12979 Binary files /dev/null and b/samples/image/gif.gif differ diff --git a/samples/image/jpeg.jpg b/samples/image/jpeg.jpg new file mode 100644 index 0000000..9422b1b Binary files /dev/null and b/samples/image/jpeg.jpg differ diff --git a/samples/image/png.png b/samples/image/png.png new file mode 100644 index 0000000..72650f3 Binary files /dev/null and b/samples/image/png.png differ diff --git a/samples/image/svg+xml.svg b/samples/image/svg+xml.svg new file mode 100644 index 0000000..d55cc72 --- /dev/null +++ b/samples/image/svg+xml.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +