on master help sign in
Add NAnt Build File syntax test file
commita5b79295d7e48c81fe6266eb1fdf7b938f45811b authorMohamed Abdelnour <mohamed.k.abdelnour@gmail.com> dateSat 29 May 2021, 06:16 (5 years ago) parente917784
3 files changed+359
tests/syntax-tests/highlighted/NAnt Build File/Default.build+167 tests/syntax-tests/source/NAnt Build File/Default.build+167 tests/syntax-tests/source/NAnt Build File/LICENSE.md+25
tests/syntax-tests/highlighted/NAnt Build File/Default.buildnew file+167
@@ -0,0 +1,167 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<project name="Paraesthesia.Tools.NAntTasks" default="all" verbose="false">
3+ <!-- === ENVIRONMENT SETUP === -->
4+ <property name="nant.settings.currentframework" value="net-2.0"/>
5+ <tstamp />
6+ <sysinfo />
7+ <property name="build.config" value="Release" />
8+ <property name="build.version" value="2.0.0.0" />
9+ <property name="build.name" value="Paraesthesia.Tools.NAntTasks" />
10+ <property name="build.dir" value="${project::get-base-directory()}\build" />
11+ <property name="build.bin.dir" value="${build.dir}\bin" />
12+ <property name="build.doc.dir" value="${build.dir}\doc" />
13+ <property name="build.install.dir" value="${build.dir}\install" />
14+ <property name="build.log.dir" value="${build.dir}\log" />
15+ 
16+ <!-- === STANDARD TARGETS === -->
17+ <target name="all" depends="build-tasks test" description="Builds all custom NAnt task projects."/>
18+
19+ <target name="clean" description="Remove all compiled output folders.">
20+ <echo message="Removing build output folder..."/>
21+ <delete dir="${build.dir}" failonerror="false" verbose="false"/>
22+ <echo message="Removing compilation artifact folders..."/>
23+ <delete failonerror="false" verbose="false">
24+ <fileset>
25+ <exclude name="lib" />
26+ <exclude name="lib\**" />
27+ <include name="**\obj\**" />
28+ <include name="**\bin\**" />
29+ </fileset>
30+ </delete>
31+ <echo message="Clean complete."/>
32+ </target>
33+
34+ <target name="test" description="Run unit tests on this project." depends="build-tests">
35+ <!-- TODO: Run the unit tests -->
36+ </target>
37+
38+ <target name="doc" description="Generates NDoc documentation." depends="build-tasks">
39+ <ndoc>
40+ <assemblies basedir="${build.bin.dir}">
41+ <include name="Paraesthesia.Tools.*.dll"/>
42+ </assemblies>
43+ <summaries>
44+ <include name="NamespaceSummary.xml"/>
45+ </summaries>
46+ <documenters>
47+ <documenter name="MSDN">
48+ <property name="AutoDocumentConstructors" value="True" />
49+ <property name="AutoPropertyBackerSummaries" value="True" />
50+ <property name="CollectionNamespace" value="${build.name} v${build.version}" />
51+ <property name="CopyrightHref" value="http://www.paraesthesia.com" />
52+ <property name="CopyrightText" value="Copyright 2007 Travis Illig" />
53+ <property name="DefaultTOC" value="Empty" />
54+ <property name="DeleteCHM" value="False" />
55+ <property name="DocumentEmptyNamespaces" value="False" />
56+ <property name="DocumentInternals" value="False" />
57+ <property name="DocumentPrivates" value="False" />
58+ <property name="DocumentProtected" value="True" />
59+ <property name="GenerateCollectionFiles" value="True" />
60+ <property name="HtmlHelpCompilerFilename" value="hhc.exe" />
61+ <property name="HtmlHelpName" value="${build.name} v${build.version}" />
62+ <property name="IncludeAssemblyVersion" value="True" />
63+ <property name="IncludeFavorites" value="True" />
64+ <property name="IncludeHeirarchy" value="True" />
65+ <property name="LinkToSdkDocVersion" value="SDK_v1_1" />
66+ <property name="OmitObjectTags" value="False" />
67+ <property name="OutputDirectory" value="${build.doc.dir}" />
68+ <property name="PlugInNamespace" value="ms.vscc" />
69+ <property name="RootPageContainsNamespaces" value="True" />
70+ <property name="ShowMissingParams" value="True" />
71+ <property name="ShowMissingRemarks" value="False" />
72+ <property name="ShowMissingReturns" value="True" />
73+ <property name="ShowMissingSummaries" value="True" />
74+ <property name="ShowMissingValues" value="True" />
75+ <property name="ShowVisualBasic" value="False" />
76+ <property name="SortTOCByNamespace" value="True" />
77+ <property name="SplitTOCs" value="False" />
78+ <property name="Title" value="${build.name} v${build.version}" />
79+ </documenter>
80+ </documenters>
81+ </ndoc>
82+ <delete>
83+ <fileset basedir="${build.doc.dir}">
84+ <include name="**/**" />
85+ <exclude name="*.chm" />
86+ </fileset>
87+ </delete>
88+ </target>
89+ 
90+ <target name="install" description="Creates distribution packages." depends="all">
91+ <mkdir dir="${build.install.dir}" />
92+ <zip verbose="true"
93+ zipfile="${build.install.dir}/${build.name}_${build.version}.zip"
94+ ziplevel="9">
95+ <fileset basedir="${build.dir}">
96+ <include name="**" />
97+ <exclude name="${build.install.dir}/**" />
98+ <exclude name="${build.log.dir}/**" />
99+ </fileset>
100+ <fileset basedir=".">
101+ <include name="readme.txt" />
102+ </fileset>
103+ </zip>
104+ <zip verbose="true"
105+ zipfile="${build.install.dir}/${build.name}_${build.version}_src.zip"
106+ ziplevel="9">
107+ <fileset basedir=".">
108+ <include name="**" />
109+ <exclude name="**/*.suo" />
110+ <exclude name="**/*.user" />
111+ <exclude name="**/*.cache" />
112+ <exclude name="**/bin/**" />
113+ <exclude name="**/build/**" />
114+ <exclude name="**/lib/*.dll" />
115+ <exclude name="**/obj/**" />
116+ </fileset>
117+ </zip>
118+ </target>
119+ 
120+ <target name="production" description="Executes the production build." depends="clean set-version all test doc cleanup-build-output install">
121+ <echo message="Completed production build." />
122+ </target>
123+
124+
125+ 
126+ <!-- === PREREQUISITE TASKS === -->
127+ <target name="build-tasks" description="Builds the custom NAnt task solution.">
128+ <!-- solution configuration="${build.config}" outputdir="${build.bin.dir}" solutionfile="Paraesthesia.Tools.NAntTasks.sln" / -->
129+ <exec program="MSBuild.exe">
130+ <arg value="Paraesthesia.Tools.NAntTasks.sln" />
131+ <arg line="/p:Configuration=${build.config}" />
132+ <arg line="/p:OutDir=&quot;${build.bin.dir}\\&quot;" />
133+ </exec>
134+ </target>
135+ 
136+ <target name="build-tests" description="Builds the unit tests for the project.">
137+ <!-- TODO: When there are unit tests, build them. -->
138+ </target>
139+
140+ <target name="cleanup-build-output" description="Cleans up the build output for archival.">
141+ <echo message="Cleaning up build output..." />
142+ <delete>
143+ <fileset basedir="${build.bin.dir}">
144+ <include name="*" />
145+ <exclude name="Paraesthesia.Tools.*" />
146+ </fileset>
147+ </delete>
148+ <echo message="Build output cleaned up. Only project output files remain." />
149+ </target>
150+
151+ <target name="set-version" description="Updates the build assembly version.">
152+ <asminfo output="AssemblyVersion.cs" language="CSharp">
153+ <imports>
154+ <import namespace="System.Reflection" />
155+ </imports>
156+ <attributes>
157+ <attribute type="AssemblyVersionAttribute" value="${build.version}"/>
158+ <attribute type="AssemblyCompanyAttribute" value="Paraesthesia" />
159+ <attribute type="AssemblyCopyrightAttribute" value="(c) 2007 - ${datetime::get-year(datetime::now())} Travis Illig" />
160+ </attributes>
161+ <references>
162+ <include name="System.dll" />
163+ </references>
164+ </asminfo>
165+ </target>
166+
167+</project>
tests/syntax-tests/source/NAnt Build File/Default.buildnew file+167
@@ -0,0 +1,167 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<project name="Paraesthesia.Tools.NAntTasks" default="all" verbose="false">
3+ <!-- === ENVIRONMENT SETUP === -->
4+ <property name="nant.settings.currentframework" value="net-2.0"/>
5+ <tstamp />
6+ <sysinfo />
7+ <property name="build.config" value="Release" />
8+ <property name="build.version" value="2.0.0.0" />
9+ <property name="build.name" value="Paraesthesia.Tools.NAntTasks" />
10+ <property name="build.dir" value="${project::get-base-directory()}\build" />
11+ <property name="build.bin.dir" value="${build.dir}\bin" />
12+ <property name="build.doc.dir" value="${build.dir}\doc" />
13+ <property name="build.install.dir" value="${build.dir}\install" />
14+ <property name="build.log.dir" value="${build.dir}\log" />
15+
16+ <!-- === STANDARD TARGETS === -->
17+ <target name="all" depends="build-tasks test" description="Builds all custom NAnt task projects."/>
18+
19+ <target name="clean" description="Remove all compiled output folders.">
20+ <echo message="Removing build output folder..."/>
21+ <delete dir="${build.dir}" failonerror="false" verbose="false"/>
22+ <echo message="Removing compilation artifact folders..."/>
23+ <delete failonerror="false" verbose="false">
24+ <fileset>
25+ <exclude name="lib" />
26+ <exclude name="lib\**" />
27+ <include name="**\obj\**" />
28+ <include name="**\bin\**" />
29+ </fileset>
30+ </delete>
31+ <echo message="Clean complete."/>
32+ </target>
33+
34+ <target name="test" description="Run unit tests on this project." depends="build-tests">
35+ <!-- TODO: Run the unit tests -->
36+ </target>
37+
38+ <target name="doc" description="Generates NDoc documentation." depends="build-tasks">
39+ <ndoc>
40+ <assemblies basedir="${build.bin.dir}">
41+ <include name="Paraesthesia.Tools.*.dll"/>
42+ </assemblies>
43+ <summaries>
44+ <include name="NamespaceSummary.xml"/>
45+ </summaries>
46+ <documenters>
47+ <documenter name="MSDN">
48+ <property name="AutoDocumentConstructors" value="True" />
49+ <property name="AutoPropertyBackerSummaries" value="True" />
50+ <property name="CollectionNamespace" value="${build.name} v${build.version}" />
51+ <property name="CopyrightHref" value="http://www.paraesthesia.com" />
52+ <property name="CopyrightText" value="Copyright 2007 Travis Illig" />
53+ <property name="DefaultTOC" value="Empty" />
54+ <property name="DeleteCHM" value="False" />
55+ <property name="DocumentEmptyNamespaces" value="False" />
56+ <property name="DocumentInternals" value="False" />
57+ <property name="DocumentPrivates" value="False" />
58+ <property name="DocumentProtected" value="True" />
59+ <property name="GenerateCollectionFiles" value="True" />
60+ <property name="HtmlHelpCompilerFilename" value="hhc.exe" />
61+ <property name="HtmlHelpName" value="${build.name} v${build.version}" />
62+ <property name="IncludeAssemblyVersion" value="True" />
63+ <property name="IncludeFavorites" value="True" />
64+ <property name="IncludeHeirarchy" value="True" />
65+ <property name="LinkToSdkDocVersion" value="SDK_v1_1" />
66+ <property name="OmitObjectTags" value="False" />
67+ <property name="OutputDirectory" value="${build.doc.dir}" />
68+ <property name="PlugInNamespace" value="ms.vscc" />
69+ <property name="RootPageContainsNamespaces" value="True" />
70+ <property name="ShowMissingParams" value="True" />
71+ <property name="ShowMissingRemarks" value="False" />
72+ <property name="ShowMissingReturns" value="True" />
73+ <property name="ShowMissingSummaries" value="True" />
74+ <property name="ShowMissingValues" value="True" />
75+ <property name="ShowVisualBasic" value="False" />
76+ <property name="SortTOCByNamespace" value="True" />
77+ <property name="SplitTOCs" value="False" />
78+ <property name="Title" value="${build.name} v${build.version}" />
79+ </documenter>
80+ </documenters>
81+ </ndoc>
82+ <delete>
83+ <fileset basedir="${build.doc.dir}">
84+ <include name="**/**" />
85+ <exclude name="*.chm" />
86+ </fileset>
87+ </delete>
88+ </target>
89+
90+ <target name="install" description="Creates distribution packages." depends="all">
91+ <mkdir dir="${build.install.dir}" />
92+ <zip verbose="true"
93+ zipfile="${build.install.dir}/${build.name}_${build.version}.zip"
94+ ziplevel="9">
95+ <fileset basedir="${build.dir}">
96+ <include name="**" />
97+ <exclude name="${build.install.dir}/**" />
98+ <exclude name="${build.log.dir}/**" />
99+ </fileset>
100+ <fileset basedir=".">
101+ <include name="readme.txt" />
102+ </fileset>
103+ </zip>
104+ <zip verbose="true"
105+ zipfile="${build.install.dir}/${build.name}_${build.version}_src.zip"
106+ ziplevel="9">
107+ <fileset basedir=".">
108+ <include name="**" />
109+ <exclude name="**/*.suo" />
110+ <exclude name="**/*.user" />
111+ <exclude name="**/*.cache" />
112+ <exclude name="**/bin/**" />
113+ <exclude name="**/build/**" />
114+ <exclude name="**/lib/*.dll" />
115+ <exclude name="**/obj/**" />
116+ </fileset>
117+ </zip>
118+ </target>
119+
120+ <target name="production" description="Executes the production build." depends="clean set-version all test doc cleanup-build-output install">
121+ <echo message="Completed production build." />
122+ </target>
123+
124+
125+
126+ <!-- === PREREQUISITE TASKS === -->
127+ <target name="build-tasks" description="Builds the custom NAnt task solution.">
128+ <!-- solution configuration="${build.config}" outputdir="${build.bin.dir}" solutionfile="Paraesthesia.Tools.NAntTasks.sln" / -->
129+ <exec program="MSBuild.exe">
130+ <arg value="Paraesthesia.Tools.NAntTasks.sln" />
131+ <arg line="/p:Configuration=${build.config}" />
132+ <arg line="/p:OutDir=&quot;${build.bin.dir}\\&quot;" />
133+ </exec>
134+ </target>
135+
136+ <target name="build-tests" description="Builds the unit tests for the project.">
137+ <!-- TODO: When there are unit tests, build them. -->
138+ </target>
139+
140+ <target name="cleanup-build-output" description="Cleans up the build output for archival.">
141+ <echo message="Cleaning up build output..." />
142+ <delete>
143+ <fileset basedir="${build.bin.dir}">
144+ <include name="*" />
145+ <exclude name="Paraesthesia.Tools.*" />
146+ </fileset>
147+ </delete>
148+ <echo message="Build output cleaned up. Only project output files remain." />
149+ </target>
150+
151+ <target name="set-version" description="Updates the build assembly version.">
152+ <asminfo output="AssemblyVersion.cs" language="CSharp">
153+ <imports>
154+ <import namespace="System.Reflection" />
155+ </imports>
156+ <attributes>
157+ <attribute type="AssemblyVersionAttribute" value="${build.version}"/>
158+ <attribute type="AssemblyCompanyAttribute" value="Paraesthesia" />
159+ <attribute type="AssemblyCopyrightAttribute" value="(c) 2007 - ${datetime::get-year(datetime::now())} Travis Illig" />
160+ </attributes>
161+ <references>
162+ <include name="System.dll" />
163+ </references>
164+ </asminfo>
165+ </target>
166+
167+</project>
tests/syntax-tests/source/NAnt Build File/LICENSE.mdnew file+25
@@ -0,0 +1,25 @@
1+The `Default.build` file has been added from https://github.com/tillig/nant-tasks under the following license:
2+
3+```text
4+The MIT License (MIT)
5+
6+Copyright (c) 2009 Travis Illig
7+
8+Permission is hereby granted, free of charge, to any person obtaining a copy
9+of this software and associated documentation files (the "Software"), to deal
10+in the Software without restriction, including without limitation the rights
11+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+copies of the Software, and to permit persons to whom the Software is
13+furnished to do so, subject to the following conditions:
14+
15+The above copyright notice and this permission notice shall be included in all
16+copies or substantial portions of the Software.
17+
18+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+SOFTWARE.
25+```