Skip to content

example command hanging in REPL when executing multi-line code #2273

Closed
@Planeshifter

Description

@Planeshifter

Description

Encountered an error when trying to run example( <alias> ) in the REPL, which runs the example code from the respective package's repl.txt file. The error seems to occur when the example code spans multiple lines.

Related Issues

None.

Questions

No.

Demo

No response

Reproduction

- `make repl` to start the REPL from the top-level directory
- `example( ttest )` to run the example code for the Student's t test

Expected Results

All example code in https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/stats/ttest/docs/repl.txt should be printed.

Actual Results

In [1]: example(ttest)

In [2]: var rnorm = base.random.normal.factory( 0.0, 2.0, { 'seed': 5776 } );

In [3]: var x = new Array( 100 );

In [4]: for ( var i = 0; i < x.length; i++ ) {

Version

0.2.0

Environments

Node.js

Browser Version

No response

Node.js / npm Version

No response

Platform

No response

Checklist

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.

Metadata

Metadata

Assignees

Labels

BugSomething isn't working.REPLIssue or pull request specific to the project REPL.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions