Bug 37831 - [PATCH] Add text/x-scala mime type.
Summary: [PATCH] Add text/x-scala mime type.
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 11:26 UTC by Benjamin Drung
Modified: 2011-08-30 15:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
0001-Add-text-x-scala-mime-type.patch (1.56 KB, patch)
2011-08-30 09:16 UTC, Benjamin Drung
Details | Splinter Review

Description Benjamin Drung 2011-06-01 11:26:18 UTC
Scala is a programming language.

Signed-off-by: Benjamin Drung <bdrung@debian.org>
---
 freedesktop.org.xml.in |    5 +++++
 tests/list             |    1 +
 tests/test.scala       |    5 +++++
 3 files changed, 11 insertions(+), 0 deletions(-)
 create mode 100644 tests/test.scala

diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index 82d6fbc..2f2df79 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -5134,6 +5134,11 @@ command to generate the output files.
       <match type="string" value="%define " offset="0"/>
     </magic>
   </mime-type>
+  <mime-type type="text/x-scala">
+    <_comment>Scala source code</_comment>
+    <sub-class-of type="text/plain"/>
+    <glob pattern="*.scala"/>
+  </mime-type>
   <mime-type type="text/x-scheme">
     <_comment>Scheme source code</_comment>
     <sub-class-of type="text/plain"/>
diff --git a/tests/list b/tests/list
index b5f16a8..cfd6b83 100644
--- a/tests/list
+++ b/tests/list
@@ -230,6 +230,7 @@ rectangle.qml text/x-qml
 # https://bugs.freedesktop.org/show_bug.cgi?id=31534
 test.scm text/x-scheme ox
 test.ss  text/x-scheme ox
+test.scala text/x-scala
 
 # xml subtypes
 test.ttx application/x-font-ttx
diff --git a/tests/test.scala b/tests/test.scala
new file mode 100644
index 0000000..324eecf
--- /dev/null
+++ b/tests/test.scala
@@ -0,0 +1,5 @@
+object HelloWorld {
+  def main(args: Array[String]) {
+    println("Hello, world!")
+  }
+}
-- 
1.7.4.1
Comment 1 Bastien Nocera 2011-08-30 08:48:48 UTC
As an attachment please.
Comment 2 Benjamin Drung 2011-08-30 09:16:56 UTC
Created attachment 50699 [details] [review]
0001-Add-text-x-scala-mime-type.patch

Okay, here the same as attachment.
Comment 3 Bastien Nocera 2011-08-30 15:35:01 UTC
Note that the tests/list file was wrong (guessing the mime-type by data failed, as you don't have any magic for the file).

commit 43eff0013d13e53b8abedca27d0c682b0a9befc3
Author: Benjamin Drung <bdrung@debian.org>
Date:   Tue Aug 30 18:14:34 2011 +0200

    Add text/x-scala mime type.
    
    Scala is a programming language.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=37831


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.