Laufzeit-Eingabe und Zonenzustand korrigieren und Change archivieren
This commit is contained in:
@@ -18,3 +18,10 @@ Konventionen:
|
||||
- Nur Konsolen-E/A (keine Forms) bis Phase 4
|
||||
- Kein Zufall/Zeit, außer der Test fixiert die Saat (`RANDOMIZE` mit
|
||||
Konstante) bzw. prüft nur Invarianten
|
||||
|
||||
Die Programme `eingabefortschritt`, `timezoneknown` und `timezonefallback`
|
||||
prüfen den TerminalBasic-Vertrag für Codepoints, gemeinsame Dateileseposition
|
||||
und den sichtbaren Zonenzustand. `tb-tz: +00:00` setzt eine bekannte UTC-Zone,
|
||||
`tb-tz: unknown` erzwingt den UTC-Rückfall. Späterer Ausfall und Erholung
|
||||
werden zusätzlich mit einer ersetzbaren Zonenquelle in den Laufzeit- und
|
||||
VM-Tests geprüft, ohne die Zeitzone des Rechners zu verändern.
|
||||
|
||||
21
tests/compat/eingabefortschritt.bas
Normal file
21
tests/compat/eingabefortschritt.bas
Normal file
@@ -0,0 +1,21 @@
|
||||
' tb-screen: 80x25
|
||||
' tb-tempdir
|
||||
' tb-keys: <F1>ä😀
|
||||
' TerminalBasic-Codepointvertrag; keine historische Bytekompatibilitaet.
|
||||
a$ = INPUT$(1)
|
||||
b$ = INPUT$(1)
|
||||
PRINT LEN(a$); ASC(a$); LEN(b$); ASC(b$); INPUT$(2)
|
||||
OPEN "eingabe.txt" FOR OUTPUT AS #1
|
||||
WRITE #1, "a,b", "ä😀", 5
|
||||
WRITE #1, "Ende"
|
||||
CLOSE
|
||||
OPEN "eingabe.txt" FOR INPUT AS #1
|
||||
INPUT #1, a$
|
||||
INPUT #1, b$, n%
|
||||
PRINT a$; ":"; b$; n%
|
||||
PRINT INPUT$(1, #1)
|
||||
LINE INPUT #1, a$
|
||||
PRINT a$; EOF(1)
|
||||
CLOSE
|
||||
KILL "eingabe.txt"
|
||||
END
|
||||
4
tests/compat/eingabefortschritt.out
Normal file
4
tests/compat/eingabefortschritt.out
Normal file
@@ -0,0 +1,4 @@
|
||||
1 0 1 59 ä😀
|
||||
a,b:ä😀 5
|
||||
"
|
||||
Ende"-1
|
||||
10
tests/compat/timezonefallback.bas
Normal file
10
tests/compat/timezonefallback.bas
Normal file
@@ -0,0 +1,10 @@
|
||||
' tb-screen: 80x25
|
||||
' tb-tz: unknown
|
||||
' Expliziter UTC-Rueckfall bleibt auch mit programmeigenem Versatz sichtbar.
|
||||
PRINT TIMEZONEKNOWN
|
||||
DATE$ = "03-15-1992"
|
||||
TIME$ = "13:45:30"
|
||||
PRINT TIMEZONEKNOWN
|
||||
PRINT DATE$; " "; TIME$
|
||||
PRINT YEAR(NOW); HOUR(NOW); INT(TIMER)
|
||||
END
|
||||
4
tests/compat/timezonefallback.out
Normal file
4
tests/compat/timezonefallback.out
Normal file
@@ -0,0 +1,4 @@
|
||||
0
|
||||
0
|
||||
03-15-1992 13:45:30
|
||||
1992 13 49530
|
||||
10
tests/compat/timezoneknown.bas
Normal file
10
tests/compat/timezoneknown.bas
Normal file
@@ -0,0 +1,10 @@
|
||||
' tb-screen: 80x25
|
||||
' tb-tz: +00:00
|
||||
' Additive TerminalBasic-Erweiterung: bekannte UTC ist kein Rueckfall.
|
||||
PRINT TIMEZONEKNOWN
|
||||
DATE$ = "03-15-1992"
|
||||
TIME$ = "13:45:30"
|
||||
PRINT TIMEZONEKNOWN
|
||||
PRINT DATE$; " "; TIME$
|
||||
PRINT YEAR(NOW); HOUR(NOW); INT(TIMER)
|
||||
END
|
||||
4
tests/compat/timezoneknown.out
Normal file
4
tests/compat/timezoneknown.out
Normal file
@@ -0,0 +1,4 @@
|
||||
-1
|
||||
-1
|
||||
03-15-1992 13:45:30
|
||||
1992 13 49530
|
||||
Reference in New Issue
Block a user