Sign in
bazel
/
bazel
/
a34fbd2f940acf37839d8f6859a1c98568dc1a82
/
.
/
src
/
test
/
starlark
/
testdata
/
string_elems.sky
blob: 3dbe7249953d0ca1c0355f360ac0bb435486f9ae [
file
] [
log
] [
blame
]
# string.elems
assert_eq
(
list
(
"abcd"
.
elems
()),
[
"a"
,
"b"
,
"c"
,
"d"
])
assert_eq
(
len
(
"aaa"
.
elems
()),
3
)
def
test_iter
():
i
=
0
for
c
in
"abcd"
.
elems
():
assert_eq
(
c
,
"abcd"
[
i
])
i
+=
1
assert_eq
(
i
,
4
)
test_iter
()