Files
lix/tests/functional2/repl_characterization/stacktrace/invalid_arg.md
T
rootile 64b434b87b tests(f2/repl): migrate stacktrace tests
Change-Id: Ic6795f22d68aea113fa2037cbd0a731ac5e698f8
2026-06-11 16:30:56 +02:00

1.9 KiB

args
args
--debugger
throw "(forever????????)"
error: (forever????????)

argument-less :st works fine

:st

0: error: (forever????????)
«string»:1:1

     1| throw "(forever????????)"
      | ^

Env level 0
static: 

Env level 1
abort baseNameOf break builtins derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true 

a non-numeric string produces an error

:st chat
:st bedroom community
error: argument 'chat' is not a valid integer

error: argument 'bedroom community' is not a valid integer

even when they start with a digit

:st 6up
error: argument '6up' is not a valid integer

or when they're floats

:st 4.50
error: argument '4.50' is not a valid integer

an integer outside of the range produces an error

:st 23571113171923
error: argument '23571113171923' is not a valid integer

argument-less :st is still at the same index after errors

:st 1
:st foo
:st

1: while calling a function
«string»:1:1

     1| throw "(forever????????)"
      | ^

Env level 0
static: 

Env level 1
abort baseNameOf break builtins derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true 


error: argument 'foo' is not a valid integer


1: while calling a function
«string»:1:1

     1| throw "(forever????????)"
      | ^

Env level 0
static: 

Env level 1
abort baseNameOf break builtins derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true 

quit

:quit
error: (forever????????)