mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
property: Fix print in error condition in property.find. (#35)
* property: Add a test to show the issue with property.find. * property: Fix property.find to print the ambiguous key
This commit is contained in:
@@ -808,6 +808,7 @@ class property-map
|
||||
if $(best[2])
|
||||
{
|
||||
import errors : error : errors.error ;
|
||||
properties = [ $(property-set).raw ] ;
|
||||
errors.error "Ambiguous key $(properties:J= :E=)" ;
|
||||
}
|
||||
return $(best) ;
|
||||
@@ -969,6 +970,10 @@ rule __test__ ( )
|
||||
$(pm).insert <toolset>gcc <os>NT : obj ;
|
||||
$(pm).insert <toolset>gcc <os>CYGWIN : obj ;
|
||||
|
||||
try ;
|
||||
$(pm).find [ new property-set <toolset>gcc <os>NT <os>CYGWIN ] ;
|
||||
catch "Ambiguous key <toolset>gcc <os>NT <os>CYGWIN" ;
|
||||
|
||||
assert.equal o : [ $(pm).find-replace <toolset>gcc ] ;
|
||||
|
||||
assert.equal obj : [ $(pm).find-replace <toolset>gcc <os>NT ] ;
|
||||
|
||||
Reference in New Issue
Block a user