From a5b79295d7e48c81fe6266eb1fdf7b938f45811b Mon Sep 17 00:00:00 2001 From: Mohamed Abdelnour Date: Sat, 29 May 2021 06:16:38 +0200 Subject: [PATCH] Add NAnt Build File syntax test file --- .../highlighted/NAnt Build File/Default.build | 167 ++++++++++++++++++ .../source/NAnt Build File/Default.build | 167 ++++++++++++++++++ .../source/NAnt Build File/LICENSE.md | 25 +++ 3 files changed, 359 insertions(+) create mode 100644 tests/syntax-tests/highlighted/NAnt Build File/Default.build create mode 100644 tests/syntax-tests/source/NAnt Build File/Default.build create mode 100644 tests/syntax-tests/source/NAnt Build File/LICENSE.md diff --git a/tests/syntax-tests/highlighted/NAnt Build File/Default.build b/tests/syntax-tests/highlighted/NAnt Build File/Default.build new file mode 100644 index 00000000..7d4a4a81 --- /dev/null +++ b/tests/syntax-tests/highlighted/NAnt Build File/Default.build @@ -0,0 +1,167 @@ + +<project name="Paraesthesia.Tools.NAntTasks" default="all" verbose="false"> +  + <property name="nant.settings.currentframework" value="net-2.0"/> + <tstamp /> + <sysinfo /> + <property name="build.config" value="Release" /> + <property name="build.version" value="2.0.0.0" /> + <property name="build.name" value="Paraesthesia.Tools.NAntTasks" /> + <property name="build.dir" value="${project::get-base-directory()}\build" /> + <property name="build.bin.dir" value="${build.dir}\bin" /> + <property name="build.doc.dir" value="${build.dir}\doc" /> + <property name="build.install.dir" value="${build.dir}\install" /> + <property name="build.log.dir" value="${build.dir}\log" /> +  +  + <target name="all" depends="build-tasks test" description="Builds all custom NAnt task projects."/> + + <target name="clean" description="Remove all compiled output folders."> + <echo message="Removing build output folder..."/> + <delete dir="${build.dir}" failonerror="false" verbose="false"/> + <echo message="Removing compilation artifact folders..."/> + <delete failonerror="false" verbose="false"> + <fileset> + <exclude name="lib" /> + <exclude name="lib\**" /> + <include name="**\obj\**" /> + <include name="**\bin\**" /> +  +  + <echo message="Clean complete."/> +  + + <target name="test" description="Run unit tests on this project." depends="build-tests"> +  +  + + <target name="doc" description="Generates NDoc documentation." depends="build-tasks"> + <ndoc> + <assemblies basedir="${build.bin.dir}"> + <include name="Paraesthesia.Tools.*.dll"/> +  + <summaries> + <include name="NamespaceSummary.xml"/> +  + <documenters> + <documenter name="MSDN"> + <property name="AutoDocumentConstructors" value="True" /> + <property name="AutoPropertyBackerSummaries" value="True" /> + <property name="CollectionNamespace" value="${build.name} v${build.version}" /> + <property name="CopyrightHref" value="http://www.paraesthesia.com" /> + <property name="CopyrightText" value="Copyright 2007 Travis Illig" /> + <property name="DefaultTOC" value="Empty" /> + <property name="DeleteCHM" value="False" /> + <property name="DocumentEmptyNamespaces" value="False" /> + <property name="DocumentInternals" value="False" /> + <property name="DocumentPrivates" value="False" /> + <property name="DocumentProtected" value="True" /> + <property name="GenerateCollectionFiles" value="True" /> + <property name="HtmlHelpCompilerFilename" value="hhc.exe" /> + <property name="HtmlHelpName" value="${build.name} v${build.version}" /> + <property name="IncludeAssemblyVersion" value="True" /> + <property name="IncludeFavorites" value="True" /> + <property name="IncludeHeirarchy" value="True" /> + <property name="LinkToSdkDocVersion" value="SDK_v1_1" /> + <property name="OmitObjectTags" value="False" /> + <property name="OutputDirectory" value="${build.doc.dir}" /> + <property name="PlugInNamespace" value="ms.vscc" /> + <property name="RootPageContainsNamespaces" value="True" /> + <property name="ShowMissingParams" value="True" /> + <property name="ShowMissingRemarks" value="False" /> + <property name="ShowMissingReturns" value="True" /> + <property name="ShowMissingSummaries" value="True" /> + <property name="ShowMissingValues" value="True" /> + <property name="ShowVisualBasic" value="False" /> + <property name="SortTOCByNamespace" value="True" /> + <property name="SplitTOCs" value="False" /> + <property name="Title" value="${build.name} v${build.version}" /> +  +  +  + <delete> + <fileset basedir="${build.doc.dir}"> + <include name="**/**" /> + <exclude name="*.chm" /> +  +  +  +  + <target name="install" description="Creates distribution packages." depends="all"> + <mkdir dir="${build.install.dir}" /> + <zip verbose="true" + zipfile="${build.install.dir}/${build.name}_${build.version}.zip" + ziplevel="9"> + <fileset basedir="${build.dir}"> + <include name="**" /> + <exclude name="${build.install.dir}/**" /> + <exclude name="${build.log.dir}/**" /> +  + <fileset basedir="."> + <include name="readme.txt" /> +  +  + <zip verbose="true" + zipfile="${build.install.dir}/${build.name}_${build.version}_src.zip" + ziplevel="9"> + <fileset basedir="."> + <include name="**" /> + <exclude name="**/*.suo" /> + <exclude name="**/*.user" /> + <exclude name="**/*.cache" /> + <exclude name="**/bin/**" /> + <exclude name="**/build/**" /> + <exclude name="**/lib/*.dll" /> + <exclude name="**/obj/**" /> +  +  +  +  + <target name="production" description="Executes the production build." depends="clean set-version all test doc cleanup-build-output install"> + <echo message="Completed production build." /> +  + + +  +  + <target name="build-tasks" description="Builds the custom NAnt task solution."> +  + <exec program="MSBuild.exe"> + <arg value="Paraesthesia.Tools.NAntTasks.sln" /> + <arg line="/p:Configuration=${build.config}" /> + <arg line="/p:OutDir="${build.bin.dir}\\"" /> +  +  +  + <target name="build-tests" description="Builds the unit tests for the project."> +  +  + + <target name="cleanup-build-output" description="Cleans up the build output for archival."> + <echo message="Cleaning up build output..." /> + <delete> + <fileset basedir="${build.bin.dir}"> + <include name="*" /> + <exclude name="Paraesthesia.Tools.*" /> +  +  + <echo message="Build output cleaned up. Only project output files remain." /> +  + + <target name="set-version" description="Updates the build assembly version."> + <asminfo output="AssemblyVersion.cs" language="CSharp"> + <imports> + <import namespace="System.Reflection" /> +  + <attributes> + <attribute type="AssemblyVersionAttribute" value="${build.version}"/> + <attribute type="AssemblyCompanyAttribute" value="Paraesthesia" /> + <attribute type="AssemblyCopyrightAttribute" value="(c) 2007 - ${datetime::get-year(datetime::now())} Travis Illig" /> +  + <references> + <include name="System.dll" /> +  +  +  + + diff --git a/tests/syntax-tests/source/NAnt Build File/Default.build b/tests/syntax-tests/source/NAnt Build File/Default.build new file mode 100644 index 00000000..c40b3030 --- /dev/null +++ b/tests/syntax-tests/source/NAnt Build File/Default.build @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/syntax-tests/source/NAnt Build File/LICENSE.md b/tests/syntax-tests/source/NAnt Build File/LICENSE.md new file mode 100644 index 00000000..91088e8b --- /dev/null +++ b/tests/syntax-tests/source/NAnt Build File/LICENSE.md @@ -0,0 +1,25 @@ +The `Default.build` file has been added from https://github.com/tillig/nant-tasks under the following license: + +```text +The MIT License (MIT) + +Copyright (c) 2009 Travis Illig + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +```