From 44505aa5b75b1046f13f2bc2a52fe0b16d975838 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Mon, 10 Aug 2026 11:11:18 -0700 Subject: Chapter 30: Text Formatting and Diagnostics Co-authored-by: Hsiang-Ying Fu <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: fuhsnn <66062782+fuhsnn@users.noreply.github.com> Co-authored-by: Symious <14933944+symious@users.noreply.github.com> Co-authored-by: Jun Kawasaki Co-authored-by: Claude Opus 5 --- .../com/seaofnodes/simple/RuntimeArgsTest.java | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/test/java/com/seaofnodes/simple/RuntimeArgsTest.java (limited to 'src/test/java/com/seaofnodes/simple/RuntimeArgsTest.java') diff --git a/src/test/java/com/seaofnodes/simple/RuntimeArgsTest.java b/src/test/java/com/seaofnodes/simple/RuntimeArgsTest.java new file mode 100644 index 00000000..9086e00c --- /dev/null +++ b/src/test/java/com/seaofnodes/simple/RuntimeArgsTest.java @@ -0,0 +1,29 @@ +package com.seaofnodes.simple; + +import java.io.IOException; +import org.junit.Test; +import static org.junit.Assert.*; + +public class RuntimeArgsTest extends TestC { + @Test public void testNativeArguments() throws IOException { + runArgs(""" + val main={ u8[~][] args -> + if(args#!=4 || args[0]#==0) return 1; + if(args[1]#!=0) return 2; + val words=args[2]; + if(words#!=9 || words[3]!=' ' || words[8]!='s') return 3; + val longArg=args[3]; + if(longArg#!=4096) return 4; + for(int i=0; i