Skip to content

Commit

Permalink
check malformed file
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed May 9, 2023
1 parent 6fc5291 commit fda799d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/Table_Tests/src/Database/SQLite_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ spec =
r2.catch . should_be_a File_Error.Unsupported_Type
empty.delete_if_exists

broken = enso_project.data / "transient" / "empty-data.db"
"SOME_RANDOM_DATA".write empty on_existing_file=Existing_File_Behavior.Overwrite . should_succeed
r3 = Data.read broken
r3.should_fail_with File_Error
r3.catch . should_be_a File_Error.Unsupported_Type
broken.delete_if_exists

Test.specify "should connect to a db file" <|
connection = Data.read file
tables = connection.tables
Expand Down

0 comments on commit fda799d

Please sign in to comment.