Skip to content

Tests fail on WSL with no obvious difference in diffs #40

@cppietime

Description

@cppietime

When building Lantern on WSL and running make test, the first test debug_helpers fails. diffing the generated output file with the expected output in test/expected/debug_helpers.out produces the following:

5,7c5,7
< CREATE TABLE small_world (
<     id varchar(3),
<     vector vector(3)
---
> CREATE TABLE small_world (
>     id varchar(3),
>     vector vector(3)
10,17c10,17
< INSERT INTO small_world (id, vector) VALUES 
< ('000', '[0,0,0]'),
< ('001', '[0,0,1]'),
< ('010', '[0,1,0]'),
< ('011', '[0,1,1]'),
< ('100', '[1,0,0]'),
< ('101', '[1,0,1]'),
< ('110', '[1,1,0]'),
---
> INSERT INTO small_world (id, vector) VALUES 
> ('000', '[0,0,0]'),
> ('001', '[0,0,1]'),
> ('010', '[0,1,0]'),
> ('011', '[0,1,1]'),
> ('100', '[1,0,0]'),
> ('101', '[1,0,1]'),
> ('110', '[1,1,0]'),

These appear to be identical, but running cat -net debug_helpers.out on the generated output shows the following:

     1  CREATE EXTENSION IF NOT EXISTS vector;$
     2  CREATE EXTENSION$
     3  CREATE EXTENSION IF NOT EXISTS lanterndb;$
     4  CREATE EXTENSION$
     5  CREATE TABLE small_world (^M$
     6      id varchar(3),^M$
     7      vector vector(3)^M$
     8  );$
     9  CREATE TABLE$
    10  INSERT INTO small_world (id, vector) VALUES ^M$
    11  ('000', '[0,0,0]'),^M$
    12  ('001', '[0,0,1]'),^M$
    13  ('010', '[0,1,0]'),^M$
    14  ('011', '[0,1,1]'),^M$
    15  ('100', '[1,0,0]'),^M$
    16  ('101', '[1,0,1]'),^M$
    17  ('110', '[1,1,0]'),^M$
    18  ('111', '[1,1,1]');$
    19  INSERT 0 8$
    20  SHOW hnsw.init_k;$
    21   hnsw.init_k $
...

So apparently some lines of the generated output have windows-style CRLF, while most of the file has unix-style LF.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions