Skip to content
This repository
Browse code

start missing columns with just X and test fixes

  • Loading branch information...
commit 82951ee61ae3bfc31408fca8401552e6b26c432e 1 parent 06a8860
Alex Graul authored June 11, 2012
2  src/parsers/delimited.js
@@ -187,7 +187,7 @@
187 187
 
188 188
                 //No column name? Create one starting with X
189 189
                 if ( _.isUndefined(strMatchedValue) || strMatchedValue === '' ) {
190  
-                  strMatchedValue = createColumnName('X');
  190
+                  strMatchedValue = 'X';
191 191
                 }
192 192
 
193 193
                 //Duplicate column name? Create a new one starting with the name
26  test/unit/bugs.js
@@ -107,8 +107,8 @@
107 107
 
108 108
     ds.fetch({ success: function() {
109 109
       equals(this._columns.length, 5);
110  
-      ok( this._column('B') );
111  
-      ok( this._column('B0') );
  110
+      ok( this._columns[2].name === 'B' );
  111
+      ok( this._columns[4].name === 'B0' );
112 112
     }});
113 113
 
114 114
   });
@@ -125,12 +125,12 @@
125 125
 
126 126
     ds.fetch({ success: function() {
127 127
       equals(this._columns.length, 7);
128  
-      ok( this._column('B') );
129  
-      ok( this._column('B0') );
130  
-      ok( this._column('A') );
131  
-      ok( this._column('A0') );
132  
-      ok( this._column('X0') );
133  
-      ok( this._column('X1') );
  128
+      ok( this._columns[1].name === 'A' );
  129
+      ok( this._columns[2].name === 'A0' );
  130
+      ok( this._columns[3].name === 'B' );
  131
+      ok( this._columns[4].name === 'B0' );
  132
+      ok( this._columns[5].name === 'X' );
  133
+      ok( this._columns[6].name === 'X0' );
134 134
     }});
135 135
 
136 136
   });
@@ -146,9 +146,9 @@
146 146
 
147 147
     ds.fetch({ success: function() {
148 148
       equals(this._columns.length, 5);
149  
-      ok( this._column('X0') );
150  
-      ok( this._column('X1') );
151  
-    }});
  149
+         ok( this._columns[2].name === 'X' );
  150
+         ok( this._columns[3].name === 'X0' );
  151
+       }});
152 152
 
153 153
   });
154 154
 
@@ -163,8 +163,8 @@
163 163
 
164 164
     ds.fetch({ success: function() {
165 165
       equals(this._columns.length, 5);
166  
-      ok( this._column('X0') );
167  
-      ok( this._column('X1') );
  166
+      ok( this._columns[2].name === 'X' );
  167
+      ok( this._columns[3].name === 'X0' );
168 168
     }});
169 169
 
170 170
   });

0 notes on commit 82951ee

Please sign in to comment.
Something went wrong with that request. Please try again.