xowf::test_item::Renaming_form_loader method map_form_constraints (protected)

 <instance of xowf::test_item::Renaming_form_loader[i]> map_form_constraints \
    form_constraints oldName newName

Defined in packages/xowf/tcl/test-item-procs.tcl

Rename form constraints starting with $oldName into $newName. Handle as well "answer=$oldName" form constraint properties.

Parameters:
form_constraints (required)
oldName (required)
newName (required)

Testcases:
No testcase defined.
Source code:
return [lmap f $form_constraints {
  #:msg check?'$f'
  if {[string match "${oldName}*" $f]} {
    regsub $oldName $f $newName f
    if {[string match "*answer=$oldName*" $f]} {
      regsub answer=$oldName $f answer=$newName f
      #:log "MAP VALUE=answer=$oldName => answer=$newName "
    }
  }
  set f
}]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: