Skip to content

Commit

Permalink
add siren header as first line of filter_siren.csv (#105)
Browse files Browse the repository at this point in the history
Co-authored-by: Josquin Cornec <[email protected]>
  • Loading branch information
Joalien and Josquin Cornec authored Mar 26, 2024
1 parent 2d52936 commit 51f37ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions createfilter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func CreateFilter(writer io.Writer, effectifFileName string, nbMois, minEffectif
perimeter = applyFilter(perimeter, f)
}

fmt.Fprintln(writer, "siren")
for siren, _ := range perimeter {
fmt.Fprintln(writer, siren)
}
Expand Down
2 changes: 1 addition & 1 deletion createfilter/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestCreateFilter(t *testing.T) {
expectedOutput := DiffWithGoldenFile(outGoldenFile, *updateGoldenFile, cmdOutput)
expectedError := DiffWithGoldenFile(errGoldenFile, *updateGoldenFile, cmdError)

assert.Equal(t, string(expectedOutput), sortOutput(cmdOutput.String()))
assert.Equal(t, string(expectedOutput), cmdOutput.String())
assert.Equal(t, string(expectedError), cmdError.String())
})
}
Expand Down
1 change: 1 addition & 0 deletions createfilter/test_golden.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
siren
444444444
555555555

0 comments on commit 51f37ea

Please sign in to comment.