CodingFries / aes_crypt_null_safe

Flutter Package for Encryption & Decryption - With added Null Safety - Created using Flutter Framework and Dart Language
https://pub.dev/packages/aes_crypt_null_safe
MIT License
5 stars 4 forks source link

line break: Decrypt Test fails when running on linux #4

Open jarrodcolburn opened 6 months ago

jarrodcolburn commented 6 months ago

Got following error:

   Expected: ... accumsan.\n\nSuspend ...
   Actual:   ... accumsan.\r\n\r\nSus ...

From this function. https://github.com/CodingFries/aes_crypt_null_safe/blob/653240139ae011d2116fd25ddf88f15249c2aded/test/aes_crypt_test.dart#L84-L95 I think this is because I'm using Linux, and it's a line feed mismatch?

jarrodcolburn commented 6 months ago

one fix would be to import 'dart:convert' show LineSplitter and change the tests's expect

// current
expect(source_data2, equals(source_data1)); 

// with Line Splitter
expect(LineSplitter().convert(source_data2), equals(LineSplitter().convert(source_data1)));

This let's the test succeed, but is this your intent?