Index: tol_tests/tol/Bugzilla/bug_000776/test.tol
===================================================================
--- tol_tests/tol/Bugzilla/bug_000776/test.tol	(revision 6afba5c6c3108c86714d3363542c5f34cd19e620)
+++ tol_tests/tol/Bugzilla/bug_000776/test.tol	(revision 6afba5c6c3108c86714d3363542c5f34cd19e620)
@@ -0,0 +1,60 @@
+/* -*- mode: C++ -*- */
+//////////////////////////////////////////////////////////////////////////////
+// FILE   : test.tol
+// PURPOSE: test for a resolved bug
+//////////////////////////////////////////////////////////////////////////////
+
+//Sets the bugzilla identifier number, your e-mail and the bugŽs summary
+  Real bugNum_ =  776;
+  Text email_ = "vdebuen@tol-project.org"; 
+  Text summary_ = "Fail using PutName";
+  Text link_ = GetTolBugzillaLink(bugNum_);
+
+  //Write here the initial test TOL code if needed
+  Real numErr0 = Copy(NError);
+  Real numWar0 = Copy(NWarning);
+
+  Set _.names = Copy(Empty);
+  Set _.data.cols = Copy(Empty);
+
+  Real _AppendVariable( Matrix P, Text name ) 
+  {
+    Real ii = FindIndexByName( _.data.cols, name );
+    Real If( ii == 0, 
+    {
+      Set Append( _.names, [[ name ]] );
+      Set Append( _.data.cols, [[ Copy(P) ]] );
+      Real n = Card(_.data.cols);
+      Matrix PutName( name, _.data.cols[n] );
+      WriteLn("name='"<<name+"'");
+      WriteLn("Name( _.data.cols["<<n+"])='"<<
+               Name( _.data.cols[n] )+"'");
+      Real SetIndexByName( _.data.cols )
+    });
+    ii
+  };
+  
+  Real { _AppendVariable( Matrix a = Rand(1,1,1,1), "x1" ) };
+
+  Real ok = Name(_.data.cols[1])=="x1";  
+  
+  Real numErr1 = Copy(NError);
+  Real numWar1 = Copy(NWarning);
+
+  Set partialResults_ = [[numErr0, numErr1, ok]];
+
+//This is a messure of the success of the test 
+  Real quality_ = And(numErr1 == numErr0, 
+                      numWar1 == numWar0, 
+                      ok);
+
+//Return the results 
+  Set resultStr_ = @strTestStatus(summary_, link_, quality_,
+                    "Partial results = "<<partialResults_,
+                    "NO DBServerType", "NO DBServerHost", "NO DBAlias",
+                    email_);
+  WriteLn(""<<resultStr_);
+  resultStr_;
+
+/* */
+
