xamarin-macios/tests/generator
Rolf Bjarne Kvinge a8fdf6db6e
Implement a different escaping/quoting algorithm for arguments to System.Diagnostics.Process. (#7177)
* Implement a different escaping/quoting algorithm for arguments to System.Diagnostics.Process.

mono changed how quotes should be escaped when passed to
System.Diagnostic.Process, so we need to change accordingly.

The main difference is that single quotes don't have to be escaped anymore.

This solves problems like this:

    System.ComponentModel.Win32Exception : ApplicationName='nuget', CommandLine='restore '/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories/ios-samples/WorkingWithTables/Part 3 - Customizing a Table\'s appearance/3 - CellCustomTable/CellCustomTable.sln' -Verbosity detailed -SolutionDir '/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories/ios-samples/WorkingWithTables/Part 3 - Customizing a Table\'s appearance/3 - CellCustomTable'', CurrentDirectory='/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories', Native error= Cannot find the specified file
      at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x0029f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-08/external/bockbuild/builds/mono-x64/mcs/class/System/System.Diagnostics/Process.cs:778

ref: https://github.com/mono/mono/pull/15047

* Rework process arguments to pass arrays/lists around instead of quoted strings.

And then only convert to a string at the very end when we create the Process
instance.

In the future there will be a ProcessStartInfo.ArgumentList property we can
use to give the original array/list of arguments directly to the BCL so that
we can avoid quoting at all. These changes gets us almost all the way there
already (except that the ArgumentList property isn't available quite yet).

We also have to bump to target framework version v4.7.2 from v4.5 in several
places because of 'Array.Empty<T> ()' which is now used in more places.

* Parse linker flags from LinkWith attributes.

* [sampletester] Bump to v4.7.2 for Array.Empty<T> ().

* Fix typo.

* Rename GetVerbosity -> AddVerbosity.

* Remove unnecessary string interpolation.

* Remove unused variable.

* [mtouch] Simplify code a bit.

* Use implicitly typed arrays.
2019-10-14 16:18:46 +02:00
..
tests [generator] Handle inheriting the same member from multiple protocols. Fixes #6366. (#6961) 2019-09-11 05:12:43 -07:00
.gitignore [tests] Import 2016-05-26 15:06:52 +02:00
Asserts.cs [tests] Port the makefile-based generator tests to NUnit. (#3019) 2017-11-20 14:55:16 +01:00
BGenTests.cs [generator] Handle inheriting the same member from multiple protocols. Fixes #6366. (#6961) 2019-09-11 05:12:43 -07:00
BGenTool.cs Implement a different escaping/quoting algorithm for arguments to System.Diagnostics.Process. (#7177) 2019-10-14 16:18:46 +02:00
ErrorTests.cs [Generator] Provide clear error message on type mismatch with BindAs error (#7016) 2019-09-19 21:05:22 -04:00
GeneratorTests.cs [mtouch/mmp/bgen] Add support for response files. (#2808) 2017-11-16 16:02:34 +01:00
Makefile [d16-2] Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279) (#6361) 2019-06-19 17:28:01 +02:00
NSApplicationPublicEnsureMethods.cs [tests] Import 2016-05-26 15:06:52 +02:00
README.md [tests] Import 2016-05-26 15:06:52 +02:00
arrayfromhandlebug.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bi1036.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bi1046.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bindas1048error.cs [generator] Persist BindAs attribute information in generated code. 2017-07-04 07:31:13 +02:00
bindas1049error.cs [generator] Persist BindAs attribute information in generated code. 2017-07-04 07:31:13 +02:00
bindas1050modelerror.cs [generator] Persist BindAs attribute information in generated code. 2017-07-04 07:31:13 +02:00
bindas1050protocolerror.cs [generator] Persist BindAs attribute information in generated code. 2017-07-04 07:31:13 +02:00
bindastests.cs [generator] Persist BindAs attribute information in generated code. 2017-07-04 07:31:13 +02:00
bmac-with-hyphen-in-name.cs [tests] Import 2016-05-26 15:06:52 +02:00
bmac_smoke.cs [tests] Import 2016-05-26 15:06:52 +02:00
btouch-with-hyphen-in-name.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug15283.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug15307.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug15799.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug16036.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug17232.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug23041.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug24078-ignore-methods-events.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug27428.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug27430.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug27986.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug29493.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug31788.cs [tests] Import 2016-05-26 15:06:52 +02:00
bug34042.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug35176.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug36457.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug37527-missing-property.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug37527-wrong-property.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug39614.cs [tests] Port the makefile-based generator tests to NUnit. (#3019) 2017-11-20 14:55:16 +01:00
bug40282.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug42742.cs [generator] The [Advice] attribute doesn't make it to the generated code. Fixes #42742 (#1887) 2017-03-21 09:20:05 -06:00
bug42855.cs [generator] Fixes bug 42855 generator should report an error for [Protocol] without a [Model] that specify a [BaseType] (#1859) 2017-03-10 09:52:32 -06:00
bug43579.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
bug46292.cs [tests] Port the makefile-based generator tests to NUnit. (#3019) 2017-11-20 14:55:16 +01:00
bug52570allowstaticmembers.cs [generator] Fixes bug 52570 - [generator] warn when [Static] is used in a [Category] (#1862) 2017-03-14 13:03:13 -06:00
bug52570classinternal.cs [generator] Fixes bug 52570 - [generator] warn when [Static] is used in a [Category] (#1862) 2017-03-14 13:03:13 -06:00
bug52570methodinternal.cs [generator] Fixes bug 52570 - [generator] warn when [Static] is used in a [Category] (#1862) 2017-03-14 13:03:13 -06:00
bug53076.cs [tests] Port the makefile-based generator tests to NUnit. (#3019) 2017-11-20 14:55:16 +01:00
bug53076withmodel.cs [tests] Port the makefile-based generator tests to NUnit. (#3019) 2017-11-20 14:55:16 +01:00
bug57531.cs [generator] Support [Async] inside categories, fixes bugzilla #57531 (#3229) 2018-01-16 08:41:25 -05:00
bug57870.cs [generator] Teach generator about WrapAttribute on Getters and Setters (#3388) 2018-02-05 21:14:08 -06:00
classNameCollision-enum.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
classNameCollision.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
desk63279A.cs [tests] Import 2016-05-26 15:06:52 +02:00
desk63279B.cs [tests] Import 2016-05-26 15:06:52 +02:00
desk79124.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
fieldenumtests.cs [generator] Add enum support for [FieldAttribute], Fixes 57537 and 57535. (#2230) 2017-06-20 13:46:00 -05:00
forcedtype.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
forum54078.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
generator-tests.csproj Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
generic-strong-dictionary.cs [tests] Fix bgen test to compile by adding missing using. (#5932) 2019-04-23 16:26:38 +01:00
ghissue3869.cs [generator] Fixes WrapAttribute usage with interface protocols (#3885) (#4210) 2018-06-11 10:26:30 -07:00
ghissue5416a.cs [generator] Warn if [NullAllowed] is used on methods. Fixes #4416 (#5464) 2019-01-24 08:57:46 -05:00
ghissue5416b.cs [generator] Warn if [NullAllowed] is used on methods. Fixes #4416 (#5464) 2019-01-24 08:57:46 -05:00
ghissue5444.cs [generator] Fix BI0000 when no argument semantics are present on a property. Fixes #5444 (#5451) 2019-01-22 09:52:39 -05:00
ghissue5692.cs [generator] Fix CMSampleBuffer usage in 3rd party bindings (#5707) 2019-03-04 08:13:34 -05:00
ghissue6626.cs [xcode11] [Generator] Do not used harcoded 'error' var name, use the one in the declaration. (#6637) 2019-07-24 13:28:07 +02:00
ghissue6863_method.cs [Generator] Provide clear error message on type mismatch with BindAs error (#7016) 2019-09-19 21:05:22 -04:00
ghissue6863_property.cs [Generator] Provide clear error message on type mismatch with BindAs error (#7016) 2019-09-19 21:05:22 -04:00
issue3875.cs [generator] Register models with unique names to not match platform types. Fixes #3875. (#3879) (#3888) 2018-04-06 19:58:20 +02:00
issue3875B.cs [generator] Register models with unique names to not match platform types. Fixes #3875. (#3879) (#3888) 2018-04-06 19:58:20 +02:00
issue3875C.cs [generator] Register models with unique names to not match platform types. Fixes #3875. (#3879) (#3888) 2018-04-06 19:58:20 +02:00
missing-export-property.cs [Generator] Ensure the correct error is raised when an Export is missing on a Property. (#4604) 2018-08-09 16:06:14 -04:00
multiple-api-definitions1.cs [tests] Import 2016-05-26 15:06:52 +02:00
multiple-api-definitions2-a.cs [tests] Import 2016-05-26 15:06:52 +02:00
multiple-api-definitions2-b.cs [tests] Import 2016-05-26 15:06:52 +02:00
noasyncinternalwrapper.cs [generator] Remove Async members from internal BaseWrapper derived types 2017-03-24 17:40:55 -06:00
noasyncwarningcs0219.cs [generator] Disable CS0219 when using AsyncAttribute to avoid warning 2017-03-24 21:08:40 -06:00
nowarn.cs [generator] Fix bug 52573 - Add nowarn and warnaserror to btouch/bmac (#1882) 2017-03-22 07:52:24 -05:00
packages.config [tests] Use latest version of NUnit for test projects to get support for parallelized tests. (#5538) 2019-02-04 15:22:00 +01:00
property-redefination-ios.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
property-redefination-mac.cs [tests] Import 2016-05-26 15:06:52 +02:00
protocol-duplicate-abstract-error.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
protocol-duplicate-abstract.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
protocol-duplicate-method-diff-length.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
protocol-duplicate-method-diff-out.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
protocol-duplicate-method-diff-return.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
protocol-duplicate-method-diff-type.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
smartenumwithframework.cs [generator] Fix smart enum FieldAttribute LibraryName generation (#2376) 2017-07-26 18:09:42 -05:00
sof20696157.cs [xcode11] Remove the WatchKit framework from iOS while keeping API stability. Fixes #6492. (#6503) 2019-08-14 17:46:55 +02:00
sof20696157.sh [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
strong-dict-native-enum.cs [generator] Add support for [Native] enums inside [StrongDictionaries] (#6763) 2019-08-13 18:36:36 -04:00
strong-dict-support-templated-dicts.cs [tests] Port the makefile-based generator tests to NUnit. (#3019) 2017-11-20 14:55:16 +01:00
virtualwrap.cs [tests][generator] Port XI/Classic tests to XI/Unified. (#1745) 2017-02-22 16:47:11 +01:00
warnaserror.cs [generator] Fix bug 52573 - Add nowarn and warnaserror to btouch/bmac (#1882) 2017-03-22 07:52:24 -05:00

README.md

Tests for the binding generator

New test

  • Create a C# file with the api definition.
  • Add the C# file to the Makefile, like all the other tests. Remember to add it to the 'all' target.