You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by sl...@apache.org on 2022/01/18 13:32:50 UTC

[daffodil-schema.g8] 03/05: Remove data and infoset directories

This is an automated email from the ASF dual-hosted git repository.

slawrence pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-schema.g8.git

commit 467aece330391ec6aeb1f63777e594da24073c02
Author: Steve Lawrence <sl...@apache.org>
AuthorDate: Fri Jan 14 07:53:52 2022 -0500

    Remove data and infoset directories
    
    Test files are generally easier to manage/inspect when tdml, data, and
    infoset files all live side by side, especially for smaller
    repositories. This should be the default.
    
    With the data directory removed, the .gitattributes file is updated to
    consider only *.scala, *.tdml, *.xml, and *.xsd test files as text. Any
    other test files are considered non-text and will have auto-crlf
    disabled. This prevents Git from modifying test files that look like
    text if auto-crlf is enabled.
---
 .../Test$name__Camel$.tdml                                          | 4 ++--
 .../{data => }/test_01.$name__camel$                                | 0
 .../{infosets => }/test_01.$name__camel$.xml                        | 0
 src/main/g8/.gitattributes                                          | 6 +++++-
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/Test$name__Camel$.tdml b/src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/Test$name__Camel$.tdml
index d897b72..75d1a4f 100644
--- a/src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/Test$name__Camel$.tdml
+++ b/src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/Test$name__Camel$.tdml
@@ -28,10 +28,10 @@ limitations under the License.
 
   <tdml:parserTestCase name="test_$name;format="camel"$_01" root="$name;format="Camel"$" model="$if(namespaced.truthy)$$package;format="packaged"$/$name;format="camel"$/xsd/$endif$$name;format="camel"$.dfdl.xsd">
     <tdml:document>
-      <tdml:documentPart type="file">$if(namespaced.truthy)$$package;format="packaged"$/$name;format="camel"$/$endif$data/test_01.$name;format="camel"$</tdml:documentPart>
+      <tdml:documentPart type="file">test_01.$name;format="camel"$</tdml:documentPart>
     </tdml:document>
     <tdml:infoset>
-      <tdml:dfdlInfoset type="file">$if(namespaced.truthy)$$package;format="packaged"$/$name;format="camel"$/$endif$infosets/test_01.$name;format="camel"$.xml</tdml:dfdlInfoset>
+      <tdml:dfdlInfoset type="file">test_01.$name;format="camel"$.xml</tdml:dfdlInfoset>
     </tdml:infoset>
   </tdml:parserTestCase>
 
diff --git a/src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/data/test_01.$name__camel$ b/src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/test_01.$name__camel$
similarity index 100%
rename from src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/data/test_01.$name__camel$
rename to src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/test_01.$name__camel$
diff --git a/src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/infosets/test_01.$name__camel$.xml b/src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/test_01.$name__camel$.xml
similarity index 100%
rename from src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/infosets/test_01.$name__camel$.xml
rename to src/main/g8/$if(namespaced.truthy)$src$else$.$endif$/test/$if(namespaced.truthy)$resources$else$.$endif$/$if(namespaced.truthy)$$package$$else$.$endif$/$if(namespaced.truthy)$$name__camel$$else$.$endif$/test_01.$name__camel$.xml
diff --git a/src/main/g8/.gitattributes b/src/main/g8/.gitattributes
index 0120b8e..959cd25 100644
--- a/src/main/g8/.gitattributes
+++ b/src/main/g8/.gitattributes
@@ -14,4 +14,8 @@ $if(false)$
 # See the License for the specific language governing permissions and
 # limitations under the License.
 $endif$
-$if(namespaced.truthy)$src/test/resources/**/$else$test/$endif$data/** text=false
+$if(namespaced.truthy)$src/test/resources$else$test$endif$/** text=false
+$if(namespaced.truthy)$src/test/resources$else$test$endif$/**/*.tdml text=true
+$if(namespaced.truthy)$src/test/resources$else$test$endif$/**/*.xsd text=true
+$if(namespaced.truthy)$src/test/resources$else$test$endif$/**/*.xml text=true
+$if(namespaced.truthy)$src/test/scala$else$test$endif$/**/*.scala text=true