(t *testing.T)
| 105 | } |
| 106 | |
| 107 | func TestTableJSON(t *testing.T) { |
| 108 | table, err := tabular.Parse([]byte("Path,Verified\nc:\\a.dll,Signed\n")) |
| 109 | require.NoError(t, err) |
| 110 | |
| 111 | out, err := table.JSON() |
| 112 | require.NoError(t, err) |
| 113 | |
| 114 | var rows []map[string]string |
| 115 | require.NoError(t, json.Unmarshal(out, &rows)) |
| 116 | require.Len(t, rows, 1) |
| 117 | assert.Equal(t, "Signed", rows[0][colVerified]) |
| 118 | } |
| 119 | |
| 120 | func TestTableJSONEmptyIsArray(t *testing.T) { |
| 121 | table, err := tabular.Parse([]byte("Path,Verified\n")) |