stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

`example` command hanging in REPL when executing multi-line code

Open Planeshifter opened this issue 1 year ago • 8 comments

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

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

Planeshifter avatar May 29 '24 01:05 Planeshifter

@Snehil-Shah This is still broken, I believe. Would you mind taking a look?

kgryte avatar Jul 29 '24 06:07 kgryte

When I attempt to run example(ttest), the REPL just crashes.

kgryte avatar Jul 29 '24 07:07 kgryte