Skip to content

Progress.list contains new lines #237

Description

@bsutton

The unit test dcli/test/src/script/dart_sdk_test.dart is failing as the Progress.list returns lines that contain trailing \n characters

This is a problem with data coming back from the mailbox and being accumulated into lines.

We have a bit of a tension here as we want the ability to process binary data (for piping data between commands) but in most cases we are actually returning lines.

I think we fix the newline issue for the moment and work through the binary issue when we it raises its head.

The error report when running unit tests via critical_test:

3:0:0 Running: test/src/script/dart_sdk_test.dart : Run dart pub     
********************************** BEGIN ERROR (1) *****************************
Test: test: "Run dart pub", /home/bsutton/git/dcli-4.x/dcli/test/src/script/dart_sdk_test.dart
Error: Expected: 'Publish the current package to pub.dev.'
  Actual: 'Publish the current package to pub.dev.\n'
            ''
   Which: is different. Both strings start the same, but the actual value also has the following trailing characters: \n

************************************ OUTPUT ************************************
Dart pathToDartExe: /home/bsutton/snap/flutter/common/flutter/bin/dart
Dart pathToDartToNativeExe: null
Dart pathToPubExe: /usr/bin/pub
Dart Version: 3.2.6
Dart Major: 3
Dart Minor: 2
which: /home/bsutton/snap/flutter/common/flutter/bin/dart
********************************** STACKTRACE **********************************
package:matcher                          expect
test/src/script/dart_sdk_test.dart 62:5  main.<fn>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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