Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

start missing columns with just X and test fixes

  • Loading branch information...
commit 82951ee61ae3bfc31408fca8401552e6b26c432e 1 parent 06a8860
@alexgraul alexgraul authored
Showing with 14 additions and 14 deletions.
  1. +1 −1  src/parsers/delimited.js
  2. +13 −13 test/unit/bugs.js
View
2  src/parsers/delimited.js
@@ -187,7 +187,7 @@
//No column name? Create one starting with X
if ( _.isUndefined(strMatchedValue) || strMatchedValue === '' ) {
- strMatchedValue = createColumnName('X');
+ strMatchedValue = 'X';
}
//Duplicate column name? Create a new one starting with the name
View
26 test/unit/bugs.js
@@ -107,8 +107,8 @@
ds.fetch({ success: function() {
equals(this._columns.length, 5);
- ok( this._column('B') );
- ok( this._column('B0') );
+ ok( this._columns[2].name === 'B' );
+ ok( this._columns[4].name === 'B0' );
}});
});
@@ -125,12 +125,12 @@
ds.fetch({ success: function() {
equals(this._columns.length, 7);
- ok( this._column('B') );
- ok( this._column('B0') );
- ok( this._column('A') );
- ok( this._column('A0') );
- ok( this._column('X0') );
- ok( this._column('X1') );
+ ok( this._columns[1].name === 'A' );
+ ok( this._columns[2].name === 'A0' );
+ ok( this._columns[3].name === 'B' );
+ ok( this._columns[4].name === 'B0' );
+ ok( this._columns[5].name === 'X' );
+ ok( this._columns[6].name === 'X0' );
}});
});
@@ -146,9 +146,9 @@
ds.fetch({ success: function() {
equals(this._columns.length, 5);
- ok( this._column('X0') );
- ok( this._column('X1') );
- }});
+ ok( this._columns[2].name === 'X' );
+ ok( this._columns[3].name === 'X0' );
+ }});
});
@@ -163,8 +163,8 @@
ds.fetch({ success: function() {
equals(this._columns.length, 5);
- ok( this._column('X0') );
- ok( this._column('X1') );
+ ok( this._columns[2].name === 'X' );
+ ok( this._columns[3].name === 'X0' );
}});
});
Please sign in to comment.
Something went wrong with that request. Please try again.